Jump to content

Help creating a form multi drop box with items from mysql database


djfox

Recommended Posts

I`m working on a new category system for the submissions to my website. The new system is broken down into two different database tables. I know the basics of creating a form and have the original drop down selection of the form for the old category system. But for this one, what I want to do is have one select drop down menu with a list (digital, traditional, photography, etc) and depending on what the user selects there, another menu will appear containing the subcategories that belong under the first selection (ie, if they choose digital, they`ll get abstract, wallpaper, fan art, but if they choose photography, they`d get wallpaper, animals, landscape). How can this be done? I`ve looked around online, googling all day but can`t find anything that is like what I`m looking for.

Link to comment
Share on other sites

What you need is an ajax call on selection of master category, which will then populate the subcategory list.

 

I use this on many sites and can help you if you get stuck.

 

Also, the categories and subcategories can live in one table in the database

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.