Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
5

Acrobat: Interaction between checkbox and textfield

Community Beginner ,
Jan 09, 2024 Jan 09, 2024

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?

TOPICS
PDF forms
786
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
2 ACCEPTED SOLUTIONS
Community Expert ,
Jan 09, 2024 Jan 09, 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?

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 10, 2024 Jan 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.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 09, 2024 Jan 09, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 10, 2024 Jan 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 10, 2024 Jan 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 10, 2024 Jan 10, 2024
LATEST

Thank you!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines