Expand my Community achievements bar.

SOLVED

Enable/disable fields based on user choices

Avatar

Former Community Member

Hi there!

I must build a form in which one of the fields should be enabled/disabled based on the user choice in a previous question (with radio buttons).

Please, where can I find the info to learn how to do it?

Thak you for any ideas!

1 Accepted Solution

Avatar

Correct answer by
Level 10

Here is the screen shot for the Script Editor..

Once the script editor is opened, then change the event to click from the dropdown on the left hand corner.

Script Editor.jpg

Thanks

Srini

View solution in original post

4 Replies

Avatar

Level 10

You can add code in the click event of the Radio buttons to set the access property of the field that you want to enable/ disable.

Field1.access = "readOnly"; // Makes the field readonly.

Field1.access = "open"; // allow the user to enter data.

Thanks

Srini

Avatar

Former Community Member

Thank you Srini!

Now... er... where do I add click events to radio buttons?

I tried right clicking them and  choosing Add Actions, but this opened the Action Builder, that does not offer a lot of options - only visible, invisible and hidden..

Thanks!

Avatar

Correct answer by
Level 10

Here is the screen shot for the Script Editor..

Once the script editor is opened, then change the event to click from the dropdown on the left hand corner.

Script Editor.jpg

Thanks

Srini