Skip to main content
Participant
January 10, 2024
Answered

Acrobat: Interaction between checkbox and textfield

  • January 10, 2024
  • 1 reply
  • 1054 views

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?

This topic has been closed for replies.
Correct answer try67

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.

1 reply

Nesa Nurani
Community Expert
Community Expert
January 10, 2024

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?

Participant
January 10, 2024

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?

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
January 10, 2024

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.