Copy link to clipboard
Copied
In a form I have a checkbox and a textfield.
Pets? [checkbox] None / [textfield]
If the checkbox gets selected, I want to empty the textfield.
If something is entered into the textfield, I want to ensure the checkbox is unselected.
Any hints?
Thank you!
PS: Stupid question: If the textbox is selected by mistake during the editing, how do I unselect it?
Copy link to clipboard
Copied
In a checkbox, as Mouse UP action use this:
this.getField("None/").value = "";
In text field as validate script, use this:
if(event.value)
this.getField("Pets?").value = "Off";
PS: not sure what you mean by this?
Copy link to clipboard
Copied
If it's a check-box, just click it again. If it doesn't "untick" it means it's a radio-button field, not a check-box.
Copy link to clipboard
Copied
In a checkbox, as Mouse UP action use this:
this.getField("None/").value = "";
In text field as validate script, use this:
if(event.value)
this.getField("Pets?").value = "Off";
PS: not sure what you mean by this?
Copy link to clipboard
Copied
Thank you, Nesa! That works!
To my PS: Let's assume I did not have these formulas. I clicked the checkbox by mistake while editing my form. How do I uncheck it again?
Copy link to clipboard
Copied
If it's a check-box, just click it again. If it doesn't "untick" it means it's a radio-button field, not a check-box.
Copy link to clipboard
Copied
Thank you!