257
Views
4
Comments
Free text field in a combo box or input box with suggestions.
Question

My screen has a form with a name and a value for an item. Users can type any name into the box and save it. But since I want to categorise the items by name, I want to make my users pick a name from a list, but still have the possibility of entering in a value they want but is not in the list.

So basically, I want to have a combo box where the user gets a free field to type in their own value.

This is not about a search option.

How would I go about making this?

2017-12-13 08-27-28
Joey Moree

Hey Rob,

You can use select2, selectize or chosen components to allow this.
These components have the option to allow a new entry from the user, while at the same time allow a prefilled list of items for the user to select from (and search from). If no value is found the user gets the option to "add" this as a new option instead.

UserImage.jpg
rob knipscheer

Joey Moree wrote:

Hey Rob,

You can use select2, selectize or chosen components to allow this.
These components have the option to allow a new entry from the user, while at the same time allow a prefilled list of items for the user to select from (and search from). If no value is found the user gets the option to "add" this as a new option instead.

I'm actually looking for an option that doesn't require me to download a forge item. 

I don't want the user to be able to add a new option, I want the user to either choose from the list or put their own name in. The suggestion list cannot change.

2017-12-13 08-27-28
Joey Moree

You don't have to persist the data to your selection list though.

 But if you want to do it without a component, you could just create a button, "create new" which toggle the view to an input instead. (outsystems just doesn't have a component like this by default).

UserImage.jpg
rob knipscheer

Joey Moree wrote:

You don't have to persist the data to your selection list though.

 But if you want to do it without a component, you could just create a button, "create new" which toggle the view to an input instead. (outsystems just doesn't have a component like this by default).


Thank you, I will try the button.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.