Skip to main content
Participating Frequently
February 16, 2023
Question

Use Textbox in one form to Populate Dropdown in other form

  • February 16, 2023
  • 1 reply
  • 1797 views

I have a multiline text box (List of possible names) in form #1 that i am trying to use to populate a dropdown box in form #2 where the user will select a name from that list for a specific response.
I tried FDF to export out from form #1 and import into form #2 with no luck. "Textbox" to "Dropdown" via FDF does not push the contents of the textbox into the dropdown. I have tried to populate a 'helper' dropdown in form number 1 and then use the FDF export/import process (so i am moving data from a dropdown in form #1 to a dropdown in form #2) but this also was unsuccessful.

 

i am hopeful the community may have a suggestion.

Please let me know if additional info is needed.

 

thank you all kindly in advance.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
February 16, 2023

Not directly, no. However, what you can do is populate another (hidden) text field with the names from the original field, and then use a script to populate the items in the drop-down with those names.

The latter code would be something like this:

 

var names = this.getField("Names").valueAsString;

this.getField("NamesList").setItems(names.split("\r"));

Participating Frequently
February 16, 2023

Aha! Of course. I just had my 'helper' on the wrong side of the FDF process.

 

thank you @try67 !