Javascript - Make other fields required if a checkbox is checked
Copy link to clipboard
Copied
Editing this post as I solved my original two problems. But I've encountered a new one.
I'd like a two fields to be required only if a checkbox has been checked. One field is a text box, the other is a signature field. I don't know how to edit the Mouse Up/Mouse Down/Etc. options of the checkbox so that the other fields are required ONLY if the checkbox is checked.
Thoughts?
Copy link to clipboard
Copied
I've actually solved for the first scenario -- with text fields! I don't think the same validation can be applied to a signature field, though, am I right?
Example script that would run after the first signature field has been signed:
var bRequired = event.value != event.target.defaultValue;
this.getField("Signature2").required = bRequired;
Copy link to clipboard
Copied
Please clearly explain the specific actions you want to take place.
Use the Acrobat JavaScript Reference early and often

