Quote Originally Posted by raverX View Post
i gave up on that module, it was annoying...

just hacked up the contacts page script to do what i wanted it to do...

you need to understand forms to some extent, tho ZenCart has functions to do most things which are pretty easy to understand..

first look in /includes/templates/theme_name/templates/tpl_contact_us_default.php
copy this to whatever you want your new page to be called (in my case 'vip')
sp tpl_vip_default.php

then edit it to suit your requirements

then goto /includes/modules/pages/contact_us/
copy that folder to whatever you called your previous one
ie: /includes/modules/pages/vip/

then edit 'header_php.php' - this will process your form when you POST to it, you will need to match the variable names to what you put in the tpl file

you may also need to go to /includes/languages/english/html_includes and copy define_contact_us.php to define_name.php (ie: define_vip.php)

you will also need to go to /includes/languages/english and copy contact_us.php to the same name (ie: vip.php)

I think that's all I did.. there may have been one other file that needs changing..

I've attached a copy of the 4 files mentioned for anyone who wants to use them as a reference.. just ignore the ladym folder as that's the source tree for the project i was working on..
I have the above form working. Now I want to add a second drop-down menu for a different form field. I added the code to the header_php.php but all that did was put the fields for both drop-down menus in both.

How do I end one drop-down and start a new one?

My code is...

// Pulldown to select a size
// Set default selection:
$default_pulldown_selection = '0';

//For validation, you're looking for the contents of the $_POST['size'] variable
// this is only set after "submit" is clicked.
$pulldown_selected_item = (isset($_POST['size'])) ? $_POST['size'] : $default_pulldown_selection ;

//build an array of entries to be displayed on the template for field 'size':
$pulldown_contents[] = array('id'=>'0', 'text'=>'Please Select');
$pulldown_contents[] = array('id'=>'standard', 'text'=>'Standard');
$pulldown_contents[] = array('id'=>'large', 'text'=>'Large');

// Pulldown to select a color
// Set default selection:
$default_pulldown_selection = '0';

//For validation, you're looking for the contents of the $_POST['color'] variable
// this is only set after "submit" is clicked.
$pulldown_selected_item = (isset($_POST['color'])) ? $_POST['color'] : $default_pulldown_selection ;

//build an array of entries to be displayed on the template for field 'color':
$pulldown_contents[] = array('id'=>'0', 'text'=>'Please Select');
$pulldown_contents[] = array('id'=>'red', 'text'=>'Red');
$pulldown_contents[] = array('id'=>'blue', 'text'=>'Blue');

I think I would have to put some code between these two lines to end one drop-down and start the next.

$pulldown_contents[] = array('id'=>'large', 'text'=>'Large');

End first drop-down

Start second drop-down
// Pulldown to select a color


in the file tpl file I have

<label class="inputLabel" for="size">Select a Size Request:</label>
<?php echo zen_draw_pull_down_menu('size', $pulldown_contents, $pulldown_selected_item); ?>
<br class="clearBoth" />

<label class="inputLabel" for="color">Color:</label>
<?php echo zen_draw_pull_down_menu('color', $pulldown_contents, $pulldown_selected_item); ?>
<br class="clearBoth" />

Can anybody tell me how to seperate the two drop down box contents? At the moment both boxes have a choice of
Standard
Large
Red
Blue

I would like the first drop-down to have a choice of Standard and Large and the second drop-down choice of Red and Blue