Page 1 of 1

drop down boxes?

Posted: Thu Jan 19, 2006 3:59 am
by cooper3000
does anyone know how to create a form that allows the user to firstly pick from a drop down list that automatically gives options in a second dropdown box.

eg.

'category1'
is selected from dropdown box 1,
this then populates dropdown box 2 with the options
'category1.a' or 'category1.b'

or if
'category2'
is selected from dropdown box 1
then dropdown box 2 gives the options of
'category2.a' or 'category1.b'

i f any one knows how I should code this please help, if not point me in the direction of a tutorial that can.

Cheers

Cooper

Posted: Thu Jan 19, 2006 4:09 am
by matthijs
Some links that might be useful:
A tutorial on devshed in which a searchable inventory system is build. It uses the functionality you describe. You might have to filter out the code you need, but since it's all well documented, that should not be a problem
http://www.devshed.com/c/a/PHP/Creating ... h-Results/
Further, Bobby van der Sluis provides an excellent write up of unobtrusive dynamic select boxes.
http://www.bobbyvandersluis.com/article ... select.php

Posted: Thu Jan 19, 2006 7:05 am
by feyd
Look up CoderGoblin's tutorial on this site as well: viewtopic.php?t=29084