Combobox with input

Combobox with input


Hello, I have combo box with some options. Let's say it's city list, and I want to have "Other" value in this list, when user chose this value I want him to be able to enter the Other city name. What will be the best way to do this?

Hello Demetre,

As you're talking aboult "combo box" and not "drop down", I'll assume that you're talking about web, not mobile.

As a first approach, I would do this:

1. Add the "Select a City" and "Other" as a special values in the combo box special list
2. Add an OnChange screen action to the combo box
3. In the OnChange, check if the value selected value is Other (you will need a special variable set for this)
4. Case the Other is selected, I would make it appear the option to the user to enter the new city and after it enters the new city, set this city as the selected one (need to refresh the combo box's datasource, the variable that stores the city ID and refresh the combo box in the screen).

For the point 4, you can make a web block appear where the user can enter the new city, you can use a Modal or even a PopUp, which in this case you will need to do a small trick to open the popup from the screen action using JavaScript and a hidden link.

Hope this can give you the right direction.