Skip to content
Home » Blog » Oracle Apex: Dynamic Action to Disable Objects

Oracle Apex: Dynamic Action to Disable Objects

This Oracle Apex tutorial shows you how to disable items, buttons, and other objects using the dynamic action.

Creating Dynamic Action to Disable Objects

In the following example, we will create a dynamic action on a button on the click event to disable a text field.

After creating a button, do right-click on the button and select Create Dynamic Action from the shortcut menu.

It will create a True action by default, click on it, then change it to Disable from the drop-down menu.

Then in the affected elements section, specify the selection type. You can choose the Items, Button, Columns, jQuery selector, JavaScript expression, Triggering element, and Event source. Suppose if you have chosen selection type as Button, then you have to specify the button name, or if you have chosen the jQuery selector, you have to specify a class or ID of the DOM object. For this example, we will specify the Item(s).

Then specify the page items for the Item(s) field. Below is the screenshot:

Oracle Apex dynamic action to disable DOM objects.

You can set the Fire on Initialization property On to fire this dynamic action on page initialization.

Now save the changes and run the page. On the button click, it will disable the item. We have chosen the button to create this dynamic action to disable the item. You can choose any other event such as Page Load, and change event of the list item, etc.

To Enable an item or other objects, the method is the same as above, but you just need to select the Action Enable instead of Disable.