Originally Posted by
medeano
Hi to all
Could anyone kindly tell me how to add and extra text field in the contact us form.
You have your name, then email address then below this id like to put another text field called "Order number"
Any help would be greatly appricated
Many thanks
It is simple 3 Step process:
Step 1
/includes/templates/YOUR TEMPLATE/templates/tpl_contact_us_default.php
ADD
PHP Code:
<label class="inputLabel" for="ordernumber"><?php echo ENTRY_ORDERNUMBER; ?></label>
<?php echo zen_draw_input_field('ordernumber', ($error ? $_POST['ordernumber'] : $ordernumber), ' size="20" id="ordernumber"'); ?> <br class="clearBoth" />
Step 2
/includes/modules/pages/contact_us/header_php.php
SEARCH
PHP Code:
OFFICE_EMAIL . "\t" . $email_address . "\n\n" .
'------------------------------------------------------' . "\n\n" .
strip_tags($_POST['enquiry']) . "\n\n" .
'------------------------------------------------------' . "\n\n" .
REPLACE
PHP Code:
OFFICE_EMAIL . "\t" . $email_address . "\n\n" .
'------------------------------------------------------' . "\n\n" .
"Order Number:\t" . strip_tags($_POST['ordernumber']) . "\n" .
strip_tags($_POST['enquiry']) . "\n\n" .
'------------------------------------------------------' . "\n\n" .
Step 3
/includes/languages/english/contact_us.php
SEARCH
PHP Code:
define('ENTRY_EMAIL', 'Email Address:');
REPLACE
PHP Code:
define('ENTRY_EMAIL', 'Email Address:');
define('ENTRY_ORDERNUMBER', 'Order Number:');
I hope im clear enough to anyone trying this. You can use same process to add any number of extra text fields.
~Time
Bookmarks