Using a dropdown menu component in an Adalo form is not impossible, but there are a few things you might want to know before you add one to your form. There are two ways to create a form in Adalo. You can use Adalo's form component or you can create a custom form. The functionality around the dropdown menu component will change depending on which approach you take.

Dropdown menus in a form component

In order to have a dropdown menu within an Adalo form, you first need to create a relationship between your database collections. It's important to note that the dropdown menu only works with a many to one relationship. The many-to-one relationship triggers the dropdown functionality vs. adding a dropdown component to a form. The form field looks like this when it's a many-to-one relationship:

When you have any other type of relationship field, this is what the form field looks like:

Let's look at an example. I have a User collection and a Cohort Category collection and I want to give users the ability to select which cohort they are signing up for via a form. Since the dropdown menu only works in a form component with a many-to-one relationship, I have to pick the following: A User can have one Cohort Category A Cohort Category can have multiple Users. For this example, this does not work because, in fact, a User could belong to multiple cohorts, which would need a many-to-many relationship.

Now let's say I offer subscriptions where a user can only be signed up for one type of subscription at a time. This would enable me to use a dropdown field in an Adalo form component.

Dropdown menus in a custom form

If you have a use case where the dropdown menu represents a one-to-many relationship or a many-to-many relationship, then you should consider building a custom form. This will require adding your form fields individually.

When you add a Dropdown Menu component to your custom form, you can select your menu options and then create a click action that updates that logged in user and then add the cohort input field selection to the user record. The one caveat here is that currently there is not a simple way to reset the input value of a dropdown menu since the values are cached in the browser.

In summary, if you have a many-to-one relationship between collections, the Adalo form component should suit your needs. If not, you can build a custom form or look to other components like toggles to achieve what you need.


What's your story?  Tell us how you use no-code
Something wrong?