Re: HTML_QuickForm2: select boxes that depend on each other
| From: | Alexey Borzov | Date: | Thu, 20 Dec 2012 07:51:00 +0000 |
| Subject: | Re: HTML_QuickForm2: select boxes that depend on each other | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-31684@lists.php.net to get a copy of this message | ||
Hi Christian,
On 19.12.2012 18:50, Christian Weiske wrote:
Why don't you use the hierselect element?I've got a form with 2 select boxes, say "color" and "shade". The selectable values in the "shade" select box change whenever a different color is selected: color="green" -> available shades: "light green" and "dark green" color="blue" -> available shades: "light blue" and "dark blue" The problem I have now is that I don't know how to pre-fill the values of the second select box depending on the values of the first when building the form.I completely forgot to tell you that I use javascript to change the values of the shade select box when the color select box is changed.