Working with disabled textfields

Von Tobias Arnhold 1.21.2015
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":

Update 03.09.2018
This CSS style disables a textfield as well: style="pointer-events: none;"

Post Tags: