Skip to main content
Participant
September 27, 2016
Question

Validating one Field from Another

  • September 27, 2016
  • 2 replies
  • 345 views

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!

This topic has been closed for replies.

2 replies

Inspiring
September 27, 2016

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.

try67
Community Expert
Community Expert
September 27, 2016

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.