Skip to main content
cmvarga5
Known Participant
February 10, 2025
Answered

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

  • February 10, 2025
  • 1 reply
  • 458 views

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;

}

Correct answer PDF Automation Station

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

1 reply

PDF Automation Station
Community Expert
Community Expert
February 10, 2025

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

cmvarga5
cmvarga5Author
Known Participant
February 10, 2025

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!!