Flexible list for a Form

Hi,

I’m looking for a way to allow a list to be available in my form to facilitate its filling. In more details, the experience I would like to provide is:

  • User can start entering a text, a list of possible values appears below, filtered by the first letters written
  • If one of the values is convenient to the user, he can click on it to select it
  • The list of possible values will be defined by previous values already entered in the database
  • If no values match the text written, then the text can be validated as it is and will be added to the database

Is there a way to do so?

Thank you in advance,

There’s no native component that does this. You might want to try:

  • Adding a joined list column to join all possible options in a comma-delimited string (or delimited by anything other than comma, if your strings can contain comma).
  • Add a Custom Component, tie the joined list column above to it, and the column where you want to store the output.
  • Prompt it to look at the joined list and display them as a dropdown, read and write the choice to the output column.
  • On adding, use a relation on lowercase format to check if the added value is in the database. If not, add an add row column to add it to your list of choices.

Hi,

Thanks a lot for the rapid answer. I am not so clear with the very last step : adding the missing value in a row column. How should I do it? Manually or is there an automatic way to do so?

I was assuming this is a form, or is it not? In a form, you can add an on-submit action and branch them out according to my last point.

  • Create a lowercase column for the submitted value.
  • Create a lowercase column for the list of choices, which I assume you will host in another table.
  • Create a relation between the two.
  • If the relation exists, don’t do anything. Else add a row to that list of choices.

Thanks ThinhDinh for your answer. I’ll see if I manage to implement it and get back to you!

1 Like

Thank you ThinhDinh, I managed to create the fields with the Custom Component as you mentioned, and the automation to update the lists of pre-existing choices with a workflow attached to the form submission. It looks like that in the form:

Unfortunately, I now face few challenges that I will share here - more for knowledge sharing, since I’m not sure anyone will be able to help out :sweat_smile:

  1. The list of choices does not disappear if I move to another field (as displayed in the image, the cursor is in “Cuvée” field). Unless I chose a pre-existing value from the list. But if i create a new value, for which the text is included in existing Domaine(s) (such as example shown in the image), the list remains visble. I’ve tried several things, but none worked: following where the cursor is - information the component theoretically has, since the field borders turn blue when I’m in it; creating a button, with the same Custom Component, to validate - but no reaction; creating a dummy value (“+ add”), in the list displayed, to benefit from the standard behavior - clicking on a value of the list closes it…
  2. I cannot force the fields created with Custom Component to be Required ones for the Form
  3. As a free plan user, Workflows are very limited: I cannot have several branches to manage scenarios like “if X then [if Y then … else …] else …”. Which prevents me from having a proper and efficient workflow to manage the update of more than 2 lists created as described in previous posts. Because I need to manage all the conditions at the same entry level, which means identifying the combination of all possible cases (list A & B are ok, but C is not; A is ok, B & C are not; B is ok, A & C are not etc.)

Thank you for your help!

Yeah this is a thing with Custom Components, you would have to prompt your way out of it and usually it isn’t a nice experience. You would just have to hope your prompt works.

This requires CSS to alter that behavior, but you don’t have access to it on the Free plan.

I don’t have a good solution for this, non-user-action Workflows are much more powerful when it comes to managing those like you said.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.