Skip to main content
Participant
May 30, 2018
Answered

Populate text field from drop down box

  • May 30, 2018
  • 1 reply
  • 16199 views

Gday,

I am creating a new form using Acrobat Pro DC (Version 2015.006.30119) and i want to select a name from a dropdown box i have created and have it pre-populate a text field to show their phone number so the user doesnt have to look it up or enter it manually.

Can someone please help me with this? Please note i do not speak code so if you can provide dumb down steps its much appreciated.

This topic has been closed for replies.
Correct answer try67

This requires using a script.

The easiest way to set it up is to add the phone number as the export value of each of the items in your drop-down.

If you do that the only thing you'll need is to enter the following code as the custom calculation script of the text field:

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

I'm assuming above that the drop-down is called "Name".

You might also want to tick the option to commit the selected value of the drop-down immediately. You'll find that under its Properties, Options tab.

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 30, 2018

This requires using a script.

The easiest way to set it up is to add the phone number as the export value of each of the items in your drop-down.

If you do that the only thing you'll need is to enter the following code as the custom calculation script of the text field:

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

I'm assuming above that the drop-down is called "Name".

You might also want to tick the option to commit the selected value of the drop-down immediately. You'll find that under its Properties, Options tab.

AlaskanCryptologist
Participating Frequently
August 17, 2021

Has something changed with Adobe where this won't work anymore.  I have tried so many times to get this to work and it doesn't populate the Text Field with the requested value.  I have tried different field names and no go.  I have been playing with Adobe for so long I am getting so tired of it not working.

AlaskanCryptologist
Participating Frequently
August 17, 2021

Sorry, here you go.


I missed one of your responses.  You mentioned I can either have scripts, or you can have an Adobe Sign form, but not both.  Well I use adobe sign forms to send out different forms.  Through Adobe Acrobat DC can I send several forms "together" so that I can use the scripts option?  Or is there something I have to do in Adobe Sign to get the scripting idea, or outcome, I want to accomplish?