Skip to main content
Participant
April 25, 2024
Question

Creating a reusable dropdown box

  • April 25, 2024
  • 1 reply
  • 790 views

I am creating a lot of forms from scratch and I have to create a dropdown box with 15 options. Is there a way to create a dropdown option and save it to reuse in my future forms? I hate to waste time creating the same dropdown box over and over in different forms. Any suggestions would be greatly appreciated.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
April 25, 2024

You can copy the field from one file to another.

Or you can use a script to populate a field with the items, like this:

this.getField("Dropdown1").setItems(["Select", "Option 1", "Option 2", "Option 3"]);

The first item in the list is the field's default value.

Participant
April 25, 2024

Thanks so much, I didn't know you could copy/paste like that from one form to the other. Much appreciated! I will try the script too as that is a better long term solution.

Participant
April 25, 2024

Just be aware that if you copy and paste the field in the same file you must also rename the copy, otherwise the two fields will always be copies of each other and have the same value.


Thanks for the warning, I will watch that.