Skip to main content
Santiman21
Known Participant
June 27, 2017
Answered

Drop Down List - Text Field

  • June 27, 2017
  • 1 reply
  • 1240 views

Hi all,

I'm needing to figure out how to let a user select one of three options from a drop down list and once they do that, have their choice populate a pre-defined note into a text field.

3 choices in a drop down each corresponding to a specific note.

Best,

Mike

This topic has been closed for replies.
Correct answer try67

As the custom calculation script of the text field you can use something like this:

var f = this.getField("Dropdown1");

if (f.valueAsString=="Option 1") event.value = "Text 1";

else if (f.valueAsString=="Option 2") event.value = "Text 2";

else if (f.valueAsString=="Option 3") event.value = "Text 3";

else event.value = "Default text";

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
June 27, 2017

As the custom calculation script of the text field you can use something like this:

var f = this.getField("Dropdown1");

if (f.valueAsString=="Option 1") event.value = "Text 1";

else if (f.valueAsString=="Option 2") event.value = "Text 2";

else if (f.valueAsString=="Option 3") event.value = "Text 3";

else event.value = "Default text";