Hi, I am trying to create a dropdown control that includes an "Other" custom text option. I have looked at various answers here in the forums, maybe I am just not using the right words. These are some of the posts I've already checked out:
What I want is to be able to have a dropdown control tied to a static entity (or however it might have a predetermined number of options). Once I select the dropdown control, it should list the options, as well as an "Other" option:
Once the user selects "Other" I would like the option for them to type in some custom text. That should then save to an entity (see "OtherDesc" in the .oml below), which should record the foreign key of the table its from (1 to 1, extension table?) as well as the actual custom text provided by the user. (Note: in my oml I do not have an extension table; rather, I have a central table that would take "OtherDesc" from multiple tables - feel free to add any input on that, but I am researching that separately and may ask in a different question).
Thank you for any help or suggestions!
Thank you @Shriyash Dixit for your example. There were a few issues with yours (e.g. once the custom text input was showing, then it wouldn't hide again if I picked something else). I did work this out.
You'll have something like this:
Make sure the Input box is in a container - that's where you'll set the visibility.
I had my color options (including "other" in a static entity). So I had a setup like this:
Finally, the visibility condition for the container around the input box can be something like this:
I haven't figured how to submit the other desc to it's own table, but I'll ask that in a separate question if necessary.
Hey @edoo not sure if this will help or not Add "Others" option in Dropdown List (Reactive Web App) | OutSystems also you can add one text box below dropdown that will be visible only once Other option is selected
That one looks to be a way of adding "other" to the list without having it on the static entity. I actually don't mind keeping "Other" on my static entity. More concerned with the last part you mentioned though, how would I make it visible only after Other option is selected? And then how could I write that response to a separate table?
@edoo I have attached your updated OML here. as per your requirement, you have to add custom input on selection "Other" as a option. I tried it please take a lookthis might help you.Thanks Shriyash