Skip to main content
Known Participant
August 14, 2024
Answered

Dropdown to hide text

  • August 14, 2024
  • 1 reply
  • 776 views

Hello Experts, 

 

         I am not sure if what I am asking makes sense.   I have a dropdown (AWS/AWR) where if AWS is chosen a text is displayed in a text box (AWS), and nothing is displayed if the other is selected. If I may ask, under the same subject, is there an option that if later we decide to add text for the second option in the dropdown, could that be down? 

This topic has been closed for replies.
Correct answer Nesa Nurani

If he wants to add text for a second option in the future, it would be a better option to go with if-else or switch approach.

1 reply

PDF Automation Station
Community Expert
Community Expert
August 14, 2024

Enter the following custom calculation script in the text box:

var dd = this.getField("Dropdown").value;

dd=="AWS"?event.value="AWS":event.value="";

Select "Commit selected value immediately" in the options tab of the drowdown.

Nesa Nurani
Community Expert
Nesa NuraniCommunity ExpertCorrect answer
Community Expert
August 14, 2024

If he wants to add text for a second option in the future, it would be a better option to go with if-else or switch approach.

Known Participant
August 14, 2024

For future reference, how would I implement that into the script?