Click on Button and Disable/Enable controls

Click on Button and Disable/Enable controls

  

Hi,

I need to disable/enabled controls on the form such as textbox, checkbox and also the containers which contains the form based on button clicked.

May i know how to do that?Can anyone advise?

Solution

Most form elements have the attribute of enabled, set this to false to disable it, you could use a variable which switches values when the button is clicked, after which you refresh the form using an ajax refresh.

Solution

Hi,

1. You need to include conditions in the "Enabled" property of the elements that you want to enable / disable. For security reasons, I would advice to "Enable / Disable" an element in a form by adding an IF envolving the Element:

In this way, it's not possible to change the status of the element by using client side inspect tools. But, you can easily include a condition in the "Enabled" propertie of the elements (it depends on the level of security you want/need to achieve).

 2. Use the "OnChange" event in the element that you are changing and point it to a screen action that will refresh the "IF(s)" or "Element(s)" to affect the other elements status.

Kind regards

Thanks Claring and Miguel