Expand my Community achievements bar.

Disable a field and invisible to print layout.

Avatar

Level 3

Hi,

My form has a check box that is labled "No Controllers"

When the value is ON it jumps to a section on my form (works good)

Now I need it to also disable some dropdowns.

And

Also, if a dropdown is chosen first then the check box "No Controller"

should not print to paper.

Thank You,

Arnold Love

3 Replies

Avatar

Level 7

To disable a dropdown, you would put a script like this on the click event of the checkbox:

if (this.rawValue == 1) {

dropDown1.access = "protected";

}

where dropDown1 would be replaced by the name of your dropdown box. You have multiple subforms in your form, for the script to work you'll need the full path to each dropdown list. You can get it easily by clicking in the scripting box first and then ctrl + clicking on the field you want to reference.

To stop the checkbox from printing, on the dropdown list(s) you'll need a script like:

if (this.rawValue != null) {

NoController.relevant = "-print";

}

Avatar

Level 3

Hi,

What if I had multiple dropdowns in that section ?

In the section there are 9.

Also if someone used the dropdowns how could i disable the checkbox?

Thanks,

Arnold

Avatar

Level 7

You could reference each dropdown in your script or cycle through them using a switch statement. This is a good post outlining switch statements:

http://forums.adobe.com/thread/483215

To disable the checkbox, you would use the same access = "protected" script I outlined earlier. Setting the access to protected denies access to the field.