Skip to main content
julianj17354222
Participant
Jul 23, 2024 2:27 PM UTC
Question

Dropdowns and Buttons

  1. how do you populate a text field based on dropdownlist selection with a button pdf adobe
This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

julianj17354222
Participant
Jul 23, 2024 2:29 PM UTC

The button will be used to populate the text field from the selected dropdown list.

Translate
try67
Community Expert
Community Expert
Jul 23, 2024 2:32 PM UTC

You can use something like this as the Mouse Up code for the button:

 

if (this.getField("Dropdown1").valueAsString=="Option 1") this.getField("Text1").value = "Fail";

else if (this.getField("Dropdown1").valueAsString=="Option 2") this.getField("Text1").value = "Pass";

else if (this.getField("Dropdown1").valueAsString=="Option 3") this.getField("Text1").value = "Excellent";

 

Adjust the field-names and values as needed, of course.

Translate