Skip to main content
julianj17354222
Participant
July 23, 2024
Question

Dropdowns and Buttons

  • July 23, 2024
  • 1 reply
  • 200 views
  1. how do you populate a text field based on dropdownlist selection with a button pdf adobe
This topic has been closed for replies.

1 reply

julianj17354222
Participant
July 23, 2024

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

try67
Community Expert
Community Expert
July 23, 2024

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.