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

How to re-hide fields after Reset A Form action

New Here ,
Feb 06, 2025 Feb 06, 2025

Checkbox LICENSES has a Mouse Up action to hide/show textbox Text4 with the following script:

if (event.target.value === "Off") {
this.getField("Text4").display = display.hidden;
} else {
this.getField("Text4").display = display.visible;
}

 

Button Clear Form has a Mouse Up action to reset a form.

 

I checked the checkbox LICENSES, textbox Text4 appears so I can enter some information.

When I clicked on the Clear Form button, the checkmark was cleared from checkbox LICENSES and the information I entered was cleared from textbox Text4. However the textbox Text4 itself stays visible.

 

How to re-hide all fields that were originally hidden after I Reset A Form?

 

Thank you.

TOPICS
How to , JavaScript , PDF forms
209
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
1 ACCEPTED SOLUTION
Community Expert ,
Feb 06, 2025 Feb 06, 2025

Remove script from checkbox and use this as custom calculation script of "Text4" field:

var f = this.getField("LICENSES").valueAsString;
event.target.display = (f === "Off") ? display.hidden : display.visible;

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 ,
Feb 06, 2025 Feb 06, 2025

Remove script from checkbox and use this as custom calculation script of "Text4" field:

var f = this.getField("LICENSES").valueAsString;
event.target.display = (f === "Off") ? display.hidden : display.visible;
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
New Here ,
Feb 06, 2025 Feb 06, 2025
LATEST

Thank you so much for the fast response 🙂

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