Adobe PDF FORM: how to make a dropdown option to populate a textfield?

Community Beginner ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

Hello there.
I have this form, and it has a dropdown with 10 options. I want to make it fill a text field with the options I click in the dropdown, as if it is a multiple choice menu.
Does anybody knows a script for this?

TOPICS
PDF forms

Views

54

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 06, 2022 Apr 06, 2022

Copy link to clipboard

Copied

As Validation script of dropdown field use this (just change text field name to your actual field name):

this.getField("Text1").value = event.value;

 

If you have choice  in dropdown that you want set text field to be empty when selected (lets say that choice is blank space) use this:

if(event.value == " ")
this.getField("Text1").value = "";
else
this.getField("Text1").value = event.value;

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 07, 2022 Apr 07, 2022

Copy link to clipboard

Copied

LATEST

Thank for your quick answer.
I have another issue, although.

I need this code to populate several lines of the same textfield or several  different textfields. What should I write to the code in order for this to work?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines