// second select $select2[0][0] = 'Red Hot Chil Peppers'; $select2[0][1] = 'The Pixies'; $select2[1][0] = 'Wagner'; $select2[1][1] = 'Strauss'; $select2[2][0] = 'Pantheist'; $select2[2][1] = 'Skepticism';
// If only need two selects // - and using the depracated functions $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:'); $sel->setMainOptions($select1); $sel->setSecOptions($select2);
// - and using the new setOptions function $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:'); $sel->setOptions(array($select1, $select2));
// If you have a third select with prices for the cds $select3[0][0][0] = '15.00$'; $select3[0][0][1] = '17.00$'; etc
// You can now use $sel =& $form->addElement('hierselect', 'cds', 'Choose CD:'); $sel->setOptions(array($select1, $select2, $select3));