Skip to main content
cmvarga5
Known Participant
Feb 10, 2025 5:06 PM UTC
Answered

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

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;

}

PDF Automation Station
Community Expert
Feb 10, 2025 5:14 PM UTC

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

2 replies

PDF Automation Station
Community Expert
Community Expert
Feb 10, 2025 5:14 PM UTC

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

Translate
cmvarga5
cmvarga5Author
Known Participant
Feb 10, 2025 5:48 PM UTC

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