New Zenner
- Join Date:
- Jan 2010
- Posts:
- 2
- Plugin Contributions:
- 0
Post #1 by spsen
Hello
I use zen 1.3.8
I made a new product type with dropdownlists in collect_info.php
All dropdowns are populated.
My problem is that i want that the second dropdown is populated with a 'where' from the first dropdownlist.
So the selected item from the first dropdownlist is a criteria for the second one.
code of first dropdownlist
<tr>
<td class="main"><?php echo constant("TEXT_PRODUCTS_CAR_BRAND"); ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_pull_down_menu('car_brand_id', $car_brand_array, $pInfo->car_brand_id, 'onchange=""');
?>
</td>
</tr>
code for the second dropdown
$car_model = $db->Execute("select car_model_id, car_model from CAR_MODEL where car_brand_id = $car_brand_id order by car_model");
while (!$car_model->EOF) {
$car_model_array[] = array('id' => $car_model->fields[car_model_id], 'text' => $car_model->fields[car_model]);
$car_model->MoveNext();}
<tr><td class="main"><?php echo constant("TEXT_PRODUCTS_CAR_MODEL"); ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_pull_down_menu('car_model_id', $car_model_array, $pInfo->car_model_id);
?></td>
When i use 'onchange="this.form.submit()"' i'm not staying on collect_info.php, but the page preview_info.php is loaded.
What do i have to fill in after onchange=.................?
can someone point me the right direction?
Thanks:smile: