Copy link to clipboard
Copied
I have a form that needs several required fields. However, when a certain checkbox is checked,
some of the fields are no longer necessary and need to become "not required" anymore.
Is there a way to do this? I'm not sure if it's even possible. If it is, it may require a java script.
I'm currently using Adobe Acrobat 8 Professional version 8.0.0 on Mac OS 10.5.8
I also have access to Adobe LiveCycle Designer ES4 on Windows 7
Yes. It's possible. You don't have any field name details though so I can't give you specific code but you just need to set the field required property to true or false. You code might look something like this.
this.getField("foo").required = false;
Copy link to clipboard
Copied
Yes. It's possible. You don't have any field name details though so I can't give you specific code but you just need to set the field required property to true or false. You code might look something like this.
this.getField("foo").required = false;
Copy link to clipboard
Copied
Thank you! Good to know it's possible.
The checkbox field name is "no previous employer" and one of the fields it needs to make not required is named "previous employer"
Can you tell me where I need to input the code to set the field required property?
Copy link to clipboard
Copied
Generally, if you want to change something in a field other than the one you're on after the user commits the value, you'd put it in the OnBlur script.
Copy link to clipboard
Copied
That worked! So awesome!
Can't thank you enough! You've been a big help.
Copy link to clipboard
Copied
I have a similar question, but I'm not using a Mac.
Needing to have a second field as a required entry after checkbox checked. I can get this to work for the first field but not the scond one. I need the second field, "Date Entered" to also be a required entry. Below is the script for the first field:
var v = this.getField("Name of Facility");
var f= event.target;
if (f.value !="Off") {
v.required = true;
} else {
v.required = false;
}
Thanks in advance for your help.