Mr_Bill
01-18-2005, 04:54 PM
What I would like to do is edit this contact us page to have a drop down menu. That would have 5 different departments returns, unsubscribe, General Questions, Custom orders and Webmaster when one of the selected item is selected it would prefill in the comments box which could be edited by the customer if they so wish to. Then when the submit or (send) is pressed it sends the information to the correct departments ie. webmaster@mysite.com, returns@returns.com can this script be modified to do this and still pull the information like email and name if the customer is logged in?
or
Make it so when they select a department it will direct them to other form page all together so unsubscribe would take them to a unsubscribe form
<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send')); ?>
<table width="100%" border="0" cellspacing="2" cellpadding="2" >
<tr>
<td class="breadCrumb" colspan="2"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></td>
</tr>
<tr>
<td class="pageHeading" colspan="2"><h1><?php echo HEADING_TITLE; ?></h1></td>
</tr>
<?php if (CONTACT_US_STORE_NAME_ADDRESS== '1') { ?>
<tr>
<td class="main" align="left" colspan="2"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
</tr>
<?php } ?>
<?php if (DEFINE_CONTACT_US_STATUS == '1') { ?>
<tr>
<td class="plainBox" colspan="2"><?php require($define_contact_us); ?></td>
</tr>
<?php } ?>
<?php
if ($messageStack->size('contact') > 0) {
?>
<tr>
<td class="main" colspan="2"><?php echo $messageStack->output('contact'); ?></td>
</tr>
<?php
}
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<tr>
<td class="plainBox" colspan="2"><?php echo TEXT_SUCCESS; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></td>
</tr>
<?php
} else {
?>
<?php
// show dropdown if set
if (CONTACT_US_LIST !=''){
?>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo SEND_TO_TEXT; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_pull_down_menu('send_to', $send_to_array); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_NAME; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_input_field('name', $_SESSION['name']); ?></td>
</tr>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_EMAIL; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_input_field('email', ($error ? $_POST['name'] : $first_name), ' size="50"'); ?></td>
</tr>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_ENQUIRY; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
</tr>
<tr>
<td class="main"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></td>
<td align="right"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></td>
</tr>
<?php
}
?>
</table></form>
or
Make it so when they select a department it will direct them to other form page all together so unsubscribe would take them to a unsubscribe form
<?php echo zen_draw_form('contact_us', zen_href_link(FILENAME_CONTACT_US, 'action=send')); ?>
<table width="100%" border="0" cellspacing="2" cellpadding="2" >
<tr>
<td class="breadCrumb" colspan="2"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></td>
</tr>
<tr>
<td class="pageHeading" colspan="2"><h1><?php echo HEADING_TITLE; ?></h1></td>
</tr>
<?php if (CONTACT_US_STORE_NAME_ADDRESS== '1') { ?>
<tr>
<td class="main" align="left" colspan="2"><?php echo nl2br(STORE_NAME_ADDRESS); ?></td>
</tr>
<?php } ?>
<?php if (DEFINE_CONTACT_US_STATUS == '1') { ?>
<tr>
<td class="plainBox" colspan="2"><?php require($define_contact_us); ?></td>
</tr>
<?php } ?>
<?php
if ($messageStack->size('contact') > 0) {
?>
<tr>
<td class="main" colspan="2"><?php echo $messageStack->output('contact'); ?></td>
</tr>
<?php
}
if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
?>
<tr>
<td class="plainBox" colspan="2"><?php echo TEXT_SUCCESS; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></td>
</tr>
<?php
} else {
?>
<?php
// show dropdown if set
if (CONTACT_US_LIST !=''){
?>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo SEND_TO_TEXT; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_pull_down_menu('send_to', $send_to_array); ?></td>
</tr>
<?php
}
?>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_NAME; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_input_field('name', $_SESSION['name']); ?></td>
</tr>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_EMAIL; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_input_field('email', ($error ? $_POST['name'] : $first_name), ' size="50"'); ?></td>
</tr>
<tr>
<td class="plainBoxHeading" colspan="2"><?php echo ENTRY_ENQUIRY; ?></td>
</tr>
<tr>
<td class="main" colspan="2"><?php echo zen_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td>
</tr>
<tr>
<td class="main"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></td>
<td align="right"><?php echo zen_image_submit(BUTTON_IMAGE_SEND, BUTTON_SEND_ALT); ?></td>
</tr>
<?php
}
?>
</table></form>