Page 1 of 1

Form Options Dependent on User Responses

Posted: Mon Oct 01, 2007 4:37 pm
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

Posted: Mon Oct 01, 2007 5:41 pm
by feyd
Like a chained select?

Also, make sure this works without Javascript by allowing the submit-button approach too.

Posted: Tue Oct 02, 2007 10:35 am
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?

Posted: Tue Oct 02, 2007 11:08 am
by feyd
Yes, javascript is required for a typical chained select. There's a tutorial in the .. Tutorial board by CoderGoblin, if memory serves.