Quantcast
Channel: APEX-AT-WORK by Tobias Arnhold
Viewing all articles
Browse latest Browse all 177

Working with disabled textfields

$
0
0
In APEX you have the possibility to disable text fields.
Unfortunatelly you can not submit those fields after the value was changed by a dynamic action or some javascript code.
Out of a security point of view in most cases this makes sense.

In case you do have to change the value during the runtime and need to send it to the database. You have to pretend that the elements are disabled. Fortunately it is quite easy to do so.

1. First all textfields must be enabled.
2. Now create two dynamic actions using the following code snippets:
2.1 Disable all necessary fields "after page load":
$('#P1_ITEM_NAME').attr('disabled', 'disabled');
2.2 Enable all necessary fields "before page submit":
$("#P1_ITEM_NAME").removeAttr("disabled");

Viewing all articles
Browse latest Browse all 177

Trending Articles