Hi, I'm new to this and need help with a form in Adobe Acrobat Pro DC.
I created a nomination form where a user can choose an award from a drop-down list named "Type of Award". When a user selects an award, I would like text to populate in text field "Criteria".
Any help would be greatly appreciated.
- What text? The same one as selected in the drop-down, or something else?
- Should this text be editable by the user, or should it only be determined by the selection in the drop-down?
Thanks for the fast reply.
New text that can be edited by the user.
The drop down list "Type of Awards" will have a few options (Service Award, Achievment medal, etc). When a user selects an option, I am hoping text will populate in a text field showing the user what's required for the selected award that can be editable.
If user selects 'Service Award' then text will populate "Describe achievement in 300 characters or less. I'd like to recognize my employee because..."
The user can choose to overwrite completely or add to it.
Also, if possible, can you help guide me where this code should be added. In Acrobat Pro, I placed the code in the drop-down list properties Action tab as a mouse exit event. Reading other threads mention to place in a validation box that's now confusing.
As the custom validation script of the drop-down field enter this:
if (event.value=="Service Award") this.getField("Criteria").value = "Describe achievement in 300 characters or less. I'd like to recognize my employee because...";
Duplicate the line for each value.
Yeah! Worked on first try. thank you thank you
Saving this code in a safe place.
Will this work on radio buttons too?
Radio buttons don't have a validation event, but you can use the Mouse Up event, instead.
However, the value should be accessed then using event.target.value instead of just event.value.