enable and disable a form on click

enable and disable a form on click



I have 2 forms on a screen with 2 radio buttons for enabling that particular form.
Now my requirement is onclick of any of the field in that form, I want that form to be enabled.
Can someone help me to achieve this?

I tried to update the value of radio button on which the form is enabled, but somehow the form is still not enabled. 

SyntaxEditor Code Snippet



Hi Anagha,

You can do this using JavaScript. For example:

1. Create one class per form and associate per field

2. In Extended Proprieties, use Propriety "onfocus"

3. Add this JavaScript:

"$( "".YourClass"" ).attr( ""disabled"", false ); 
$( "".YourClass"" ).attr( ""readonly"", false );"

To be more simple, you can create one function Javascript and call her in onfocus propriety.

You can also use the following script, which changes all inputs within the form:

$(""#YourFormId :input"").prop("disabled", false);

I Hope it helps!