Page 1 of 1
I need to add customers telephone number to contact form?
Posted: Mon Jul 18, 2011 5:18 pm
by xl5
Hi
How do you add an extra field to the contact form to include a customers telephone number?
[SOLVED]
Re: I need to add customers telephone number to contact form
Posted: Mon Jul 18, 2011 10:13 pm
by uksitebuilder
Re: I need to add customers telephone number to contact form
Posted: Tue Jul 19, 2011 2:47 pm
by xl5
Hi
My OC is 1.4.9.1 any ideas? Would the code work on this?

Re: I need to add customers telephone number to contact form
Posted: Tue Jul 19, 2011 2:57 pm
by uksitebuilder
pass, I am a late starter with OC and only started using at 1.5.0.1
Re: I need to add customers telephone number to contact form
Posted: Tue Jul 19, 2011 3:06 pm
by xl5
Same here, but thanks for your reply.

Re: I need to add customers telephone number to contact form
Posted: Wed Jul 20, 2011 12:17 am
by Johnathan
If you want to create an entirely new contact form, I just released a Flexible Form extension that could do this. You can see it here:
http://www.getclearthinking.com/store/flexible-form
Re: I need to add customers telephone number to contact form
Posted: Wed Jul 20, 2011 4:47 pm
by xl5
Nice addition Johnathan but i was hoping for a bit of additional code to add one more field to the standard contact form ie(telephone number).This question has been posted a few times by various people with no answers. Surely OC should include such a basic request for someones telephone number in case the vender needs to discuss anything further before they purchase.

Re: I need to add customers telephone number to contact form
Posted: Fri Jul 22, 2011 4:35 am
by SteveSherry
Re: I need to add customers telephone number to contact form
Posted: Fri Jul 22, 2011 2:09 pm
by xl5
Thats it, but instead of "surname" i would like "Tel." Have you the code?
Cheers

Re: I need to add customers telephone number to contact form
Posted: Fri Jul 22, 2011 3:40 pm
by xl5
Thanks Steve, that pointed me in the right direction and i have now sorted it! Her is what you do:
cat/view/theme/default(your temp)/template/information/contact tpl.
Find
Code: Select all
<tr>
<td><?php echo $entry_name; ?><br />
<input type="text" name="name" value="<?php echo $name; ?>" />
<?php if ($error_name) { ?>
<span class="error"><?php echo $error_name; ?></span>
<?php } ?></td>
</tr>
<tr>
<td><?php echo $entry_email; ?><br />
<input type="text" name="email" value="<?php echo $email; ?>" />
<?php if ($error_email) { ?>
<span class="error"><?php echo $error_email; ?></span>
<?php } ?></td>
</tr>
And replace with
Code: Select all
<tr>
<td>First Name:<br />
<input type="text" name="name" value="" />
</td>
</tr>
<tr>
<td>Telephone:<br />
<input type="text" name="telephone" value="" />
</td>
</tr>
<tr>
<td>E-Mail Address:<br />
<input type="text" name="email" value="" />
</td>
You can obviously change "telephone" for "surname" etc to suit.

Example :
http://www.gallerysales.co.uk/index.php ... on/contact