Form Or Dropdown Menu: Categories > Subcategories

Hi guys! :blush:

There is a problem I am facing, maybe it’s a stupid question (my first month on Adalo) but is it possible to have a dropdown (possibly inside a form), in which we select for example “sport” among a set of other activities, and then automatically in the dropdown below, you can select the type of sports “boxing”, “dance”…

Basically I’m talking about categories> subcategories. I don’t know if this is the right way to do it but I have created 2 collections: categories and subcategories, linked between them by a relationship (a category can have several subcategories, but a subcategory can have only one category).

So, I made a dropdown containing the categories, but I don’t know how to filter the second dropdown (containing the subcategories) so that it only contains the subcategories of activities belonging to the first selected category.

I’ll tell you if it can influence the answer, but the goal is that the user can create an event, and that he can choose from a set of activities > and sub-activities for his event.

And finally, is it possible to do this with a form, or just with the dropdown menu? (ideally, it would be with the form, because it could be on the same page as the creation of the event, which is already a form).

Thank you very much! :relaxed:

Mathieu

I saw your answer although you deleted it!
You suggested to “make a database collection “sports” and than add to the db “Boxing”, “Dance” etc as single entities to the collection, then in the form add dropdown and connect the dropdown with the “sports” collection.” but if I do that, it will be “sport”>“subcategories” and I want the user to also be able to choose between different “categories” (sport, movie, food…)… that’s why I said “categories”>“subcategories”.

So maybe I should create as many collections as I need (each of them for a category) with all of their subcategories added inside as single entities - like you said. And then I would need to have different screens, and ask first the user which categories he’s interested about in a dropdown. On the next screen, I would show the correct list of subcategories depending of which category he chosen before. What do you think?
Not a better solution? There is no way to have everything on the same screen?

I’ll make a cloneable app for you so you could clone it and see the structure of the app!

2 Likes

Thank you! That would be amazing :relaxed:

Take a look and feel free to clone the app!
https://previewer.adalo.com/40b5562e-2766-4264-84a7-bb689aec7805

2 Likes

Thanks boss! I’m looking at it right now.

Tell me if you have any questions or if you need any help!

1 Like

Amazing! Thank you very much.
It’s so much better with a cloneable app…

But I actually have another question: If you want your user to be able to select the sport > coach, but also, if he wants another coach, to have the option to enter the name of the coach of his choice… how would you proceed?
Would you leave the 2 dropdowns, and in the second dropdown “choose a coach”, you would put all the way down at the end “someone else”… but is there a way that the fact of selecting “someone else” in the dropdown, could bring up a text input or a form in which to enter the name of the coach that he wants?

I actually would like this text input to appear only if he wants another coach (otherwise it has no interest to show this text input every time) or by selecting “someone else” in the dropdown, or by pressing a button below “someone else?”.

Do you know the best way to achieve it?

By the way, for the future, are you a freelance (asking just in case, if I need you) or you’re working for Adalo?!

Tomorrow I’ll create another clonable app.

For the last question, I am not a freelancer, however, there are adalo experts out there!

1 Like

Ok thank you very much!!
Yes, alright!

Hi back!

I just realized that if we add a title or text above the dropdowns, the dropdowns no longer work correctly. Do you know why?
The thing happened in my app, then I reproduced it on your app, same thing is happening: when you select a sport, the coach doesn’t change…

You can see it here: https://previewer.adalo.com/74c2fa7f-6435-4a34-93e6-3e64873862ad

I finally finished the other version for typing in a coach name. Sorry if I’m a bit late!
https://previewer.adalo.com/40b5562e-2766-4264-84a7-bb689aec7805

Thank you my friend! Don’t be sorry, don’t worry.

Let me know when you have a look at the clonable app that I sent you in my last post.
I’m looking at the last one you sent me right now (it looks pretty good, but I think there is a problem with the type it functionality, I will take a closer look).

For me, the cloneable app is fine.

The one that I sent you back? Look, if you select another sport in the sport dropdown, the coach dropdown doesn’t actualize - it shows the same teachers.

I gotta respect all this work. :open_mouth:

Hmmm…that is so weird! :thinking:

On this link, it works for some reason…

1 Like

Yes I do not know why, I have the same problem on my side … it is not stable, the system with the 2 dropdowns (category and sub-category) works at the beginning, but when we try multiple times, there is something like “breaking”, and it no longer works. I tried several times, but the subcategories dropdown is no longer “connected” to the categories dropdown.
Tell me if you have a solution or if you know what could be the problem :thinking:

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