Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

Link a text box to a dropdown list selected value

$
0
0

I have a drop drown list with 5 names in an Adobe Acrobat PDF. Based on the person's name you select in the drop down list I would like the text box to auto populate with that person's phone number. For instance:

 

Drop Down List Field Name ('Name')

Jake

Bob

Maria

 

Phone Numbers Field Name ('Number') in order for simplicity Jake's number is 100 and so on.

100 //Jake//

200 //Bob//

300 //Maria//

 

My code is not working and I am close to figuring it out, do you know what the problem is?

 

var x=100;

var y=200;

var z=300;

 

if(this.getField('Name').value='Jake')

    this.getField('Number').value=x;


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>