Form Options Dependent on User Responses

It doesn't matter if you do all the error checking in the world, or if you have the most beautiful graphics, if your site or application design isn't usable, it's not going to do well. Get input and advice on usability and user interface issues here.

Moderator: General Moderators

Post Reply
Alicia
Forum Newbie
Posts: 2
Joined: Mon Oct 01, 2007 4:21 pm

Form Options Dependent on User Responses

Post by Alicia »

I am developing a complex order form in php/mysql (with about 100 options in all) that needs to produce certain options dependent upon the the users selections. For example:

The user is given a drop down box with options 1, 2, and 3. If the user selects option 1, then he should be able to choose between options a, b, or c. If the user selects option 2, then he should be given the choice between options d, e, or f and so on.

I would like to use some code that will cause the sub-options to appear when the user selects option 1, 2, or 3, rather than forcing the user to click submit. Is this possible? If not, how is the best way to collect this information? I would appreciate general advice from anyone with experience developing complex forms.

Also--is this the best thread for this post? I am new to the forum.

Thanks in advance
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Like a chained select?

Also, make sure this works without Javascript by allowing the submit-button approach too.
Alicia
Forum Newbie
Posts: 2
Joined: Mon Oct 01, 2007 4:21 pm

Post by Alicia »

Thanks for your reply. A chained select may be what I'm looking for, although I wasn't familiar with the term before this post. Are you aware of any good tutorials that describe it's functions and how to implement it?

Would I need to implement javascript in order for it to function?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Yes, javascript is required for a typical chained select. There's a tutorial in the .. Tutorial board by CoderGoblin, if memory serves.
Post Reply