How do you use a selection from a drop down menu to auto populate a selection in a textbox.

I'm trying to create a form where once you select the value from the dropdown menu it will auto populate a certain text in a desinated textbox.


Jessica Boice


3 Answers

You can simply add this custom calculation script to the text box:

event.value=this.getField("Combo Box").value;

Of course, change "Combo Box" to the actual name of your drop down field if you want it to change instantly, select "Commit selected values immediately" on the options tab of the drop-down (combo box).


David Dagley   

Ok, but how do you get it to auto fill with a certain text when you select an item in the drop down?

You can add the text you want to show for each selected item in the dropdown list as the Export Value of each Item List:

enter image description here


Almir R V Santos   

Do you want the item selected to immediately update the text field or only upon exit from the check box field?

For immediate display:

  1. Create text field to receive the value from the drop down box
  2. Create drop down box.
  3. Add items and values
  4. Select the "Commit selected value immediately" option.
  5. Add the following custom key stroke script:

    if(event.willCommit == false) {

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

    }

Other wise add the following script to the custom JavaScript calculation for the text box:

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


George Kaiser   


Please specify a reason: