cancel
Showing results for 
Search instead for 
Did you mean: 

Change Properties of fields at Runtime

Former Member
0 Kudos

Hi

How can i change the Properties of The fieldsin adobe form at Runtime like readonly property to true or false.

Thanks

Sunitha Hari

Accepted Solutions (0)

Answers (1)

Answers (1)

chintan_virani
Active Contributor
0 Kudos

Sunitha,

You can easily achieve this in Javascript or FormCalc. Lets say you want the Texfield called txtName to be invisible. ON form:initialize event add the following code and change the language to Javascript:

txtName.presence= "invisible";

Additionally if you want set value you can use

<Textfield-id>.value = "<some value here>"

or if you want the field to be readonly use

<Textfield-id>.access = "readOnly";

at runtime.

For eg:-
 txtName.value = "Chintan";
 txtName.access = "readOnly"

The Designer help is very useful in such cases. Please refer it.

Chintan