Copy link to clipboard
Copied
Greetings! and thanks for any input.
I have a text field being validated based on two other fields and a checkbox - if the box is checked, the input is compared to the first field; if it is unchecked, the input is compared to the other field instead. I've coded this and it's working perfectly.
What I'd like to do is have the field re-validated when the checkbox is clicked, so that the effect of the checkbox on the validation is immediate rather than the field itself having to be changed again. Is there a way to do this?
Hope my explanation is clear enough. Thanks again!
Copy link to clipboard
Copied
You'll need to either use a separate field to perform the validation (for example, in the calculation script of a hidden text field), or duplicate (and slightly modify) your code so that it also executes when the MouseUp event of the check-box is triggered.
Copy link to clipboard
Copied
You can either add some code to the Mouse Up event of the check box or you can set up a hidden text field and set up a custom calculation script, which could do the job of validating the other text field. The main difference is the check box script will get triggered whenever its value is changed, and the calculation script will be triggered whenever any field value changes.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now