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

Hidden field made visible when drop down is selected (delay)

Explorer ,
Feb 10, 2025 Feb 10, 2025

I've been using this script and it worked perfectly in the previous document. All I did was change the button names (shortened them). Now that I updated the document and changed the form field names, it is now delaying the action. It was instant before. Now, when I select "Other" int he drop down list, it still skips the hidden form field unless I click tab a few times or if I have to physically place my mouse in the form field. Am I doing something wrong?

 

//Showing the "Other" Field

this.getField("SB3. OA Other Type of Business").required = (event.value=="Other");

if (event.value == "Other") { this.getField("SB3. OA Other Type of Business").display = display.visible; }

 

//Hiding the "Other" form field if these are selected

else if (event.value == "Choose a selection") {

this.getField("SB3. OA Other Type of Business").display = display.hidden;

}

else if (event.value == "Not a registered business") {

this.getField("SB3. OA Other Type of Business").display = display.hidden;

}

else if (event.value == "Not for profit/Charitable Organization") {

this.getField("SB3. OA Other Type of Business").display = display.hidden;

}

TOPICS
How to , JavaScript , PDF , PDF forms , Standards and accessibility
189
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 10, 2025 Feb 10, 2025

Do you have "Commit selected value immediately" selected in the options tab of your dropdown?  Did you check the calculation order?

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

Do you have "Commit selected value immediately" selected in the options tab of your dropdown?  Did you check the calculation order?

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
Explorer ,
Feb 10, 2025 Feb 10, 2025
LATEST

No, I do not have a calculation order. I do not have any of those.

 

Just clicked on "commit selected value immediately" and it worked! Thank you so much!!

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