Many to Many relationship dropdown in a form?

Is it possible to have a dropdown menu in a form that comes from a many to many relationship?

This seems to only work if it’s a one to one relationship?

Which I don’t understand because the functionality is there in the DB add record? Or am I doing something wrong?

3 Likes

Form fields don’t currently support many to many relationships, but you should be able to do this be adding an additional update action to your form’s submit button.

1 Like

Sorry for only seeing this reply now Ben.

I’m not sure what you mean for your solution?

re-reading your orignal post now, I think I may have misunderstood it. Could you share a screenshot/video of what you’re trying to do.

Hi, I’m having a similar issue.

I’m building a recipe app that lets users save their favorite recipes.

I have two types of database collections -

  1. Recipes
  2. Categories

Categories are broken down into various types (e.g. cuisine and dish type) and I have set the relationship between these two collections as many-to-many.

When I update a recipe’s categories in the Database tab, I see a multi-select dropdown that displays all the category options and lets me attach multiple categories to a recipe. This is great and what I expected to show up in the end-user form.

However, in my “Create New Recipe” form, the Categories input appears as a text input field. See screenshots below.

Any suggestions on what I can do?

3 Likes

I’m stuck here also. I have a list of projects and a list of users. Users need a way to apply to projects but I don’t see any way to support that. Many to many support assumes that a user action can add an entry to the many to many (like a map relationship). Without this feature a lot of use cases are blocked. I’ll add this to the feature request list.

I tried to capture the feature request here: https://adalo.canny.io/feature-requests/p/add-a-record-to-many-to-many-relationships-map give it an upvote and/or describe your use case if you’d like to see support for this.

Try building your own form, do not use the template one. If you add text fields and dropdown menus, then put a “submit” button at the end, and the action would be to create a new event using the above text fields and dropdown menus.

1 Like

You can use a custom list and toggles to achieve this: https://help.adalo.com/component-basics/toggles#toggles-in-lists

1 Like

Thanks @Ben I can confirm that using a toggle allows for this. There’s no way to do the same thing with a button, right? It’s a more minor need to be able to use a button to “apply for a job listing” or “join a group”, etc. The checkbox feels weird for these sorts of use cases and a button is a more standard/expected UX control for these sorts of flows, but it’s good to have a workaround in the meantime.

You can use a regular button that’s part of a custom list or on a details screen for this. You just need to add an action to the button to update the logged in user.

Im sorry but going back to the original question, I cant get my many to many dropdown filter to work. Is it possible to have a filter with a many to many relationship? Its a food app so you can tag a food with multiple tags (dairy, gluten free…) and have multiple foods with the same tag.

Anybody managed to establish the above?

I have a form creating “x” which have many to many relationships with “y” but while filling out the form for “x” it doesn’t give me an option to select “y” ( instead a text field appears which is not of any help)

Thanks

@CydeSwype were you able to do it with toggle? if yes, could you please explain, how?

Not sure is this what you want.

But, here are cloneable apps that might be related to it.