Bit of a tricky one
I’m trying to create a job board where users can filter firstly by a main category e.g. “marketing” and then filter by a 2nd dropdown which displays sub-categories e.g. “social marketing”. I’ve set this up by creating another data type called “Skills”(this is my sub-category) and then 2 types within this called “Skill”(the actual sub category) and “skills_categories”. I’ve managed to get it so that only the relevant sub-categories show in the dropdown when the main category is selected, however there are some issues. With the current setup, no jobs display at all until a sub-category is selected, however the intended behaviour is that all jobs will display and then the sub-category would simply filter the jobs.
I’m getting an error which says: “Default value should be Skills but right now it is a text”. I feel like this has something to do with it, but can’t quite work out what the issue is.
You had the right idea with Sub Categories but you need to also do that for Main Categories.
You database structure should at least have the following (the field’s data types are in parenthesis):
Table #1 - Main Category
- name (text)
- list of sub categories (list of Sub Categories (see Table #2))
Table #2 - Sub Category
Table #3 - Job
- title (text)
- main category (Main Category (see Table #1))
- *list of sub categories (list of Sub Categories)
*When a user is creating a job post, they should ONLY be able to select Sub Categories that are in their selected Main Category’s “list of sub categories” field.
Hope this helps!
Thanks for the great advice!
I’ve followed exactly as you have suggested although I’m still struggling to piece it all together in my head. I had initially been following this workflow > https://bubble.io/page?name=index&id=countrycity&tab=tabs-1 which seems to be the opposite of the way you suggested as the categories are in the sub-category type as opposed to the other way round.
In the “category” type, I am unable to anything to the list of skills(I’m assuming because it is of the type “skills” rather than text) so I’m not sure how I actually create the nesting effect?
Sorry, that’s a bit vauge but hopefully it makes sense.
Thanks so much again.
From the example you linked, the Country table should have this field:
Just follow everything from my previous message in order. You should be good. Update me on your progress.
Ok, cool! Thanks for that.
Just one more question. How can I add categories and skills to my jobs. As the type is not “text”, it won’t allow me to add anything manually?
Thanks so much again
Make the data type a Category instead of text.
I can only get this working when I set the data type to text. When I have the data types set to “list of categories” or “list of skills”, I am then unable to add any data for these fields in the App data tab. Am I doing something wrong here?
See the image below. Click “Primary fields”. Then change the Categories and Skills to whatever text field you use to represent them (like name or title). Then try adding them to the list of categories field in the Jobs table.
Amazing! thanks so much for this and all your help. I really appreciate it
This topic was automatically closed after 70 days. New replies are no longer allowed.