Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 31, 2022 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/4264805fd60b525b6f4f7c11c90b2f0f to your computer and use it in GitHub Desktop.
Save bjoerntx/4264805fd60b525b6f4f7c11c90b2f0f to your computer and use it in GitHub Desktop.
var checkBox1 = this.getField('CheckBox1');
var checkBox2 = this.getField('CheckBox2');
checkBox1.setAction('MouseUp', 'validate(checkBox1, "FormText1")');
checkBox2.setAction('MouseUp', 'validate(checkBox2, "FormText2")');
function validate(field, formTextField) {
if (field.isBoxChecked(0)) {
this.getField(formTextField).value = 'Checked';
}
else {
this.getField(formTextField).value = 'Not Checked';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment