Jump to content

Add new field to contact form


Recommended Posts

Hi there!

 

I have just managed to add a new 'field' for a phone number on my contact form, however I can't get the code to send it through along with the other ones when I get a notification email when a customer contacts me via the form.

 

This is what I've got so far ... can anyone tell me what I need to put in?? Thanks!

 

</p>

<p id="desc_contact0" class="desc_contact"> </p>

{foreach from=$contacts item=contact}

<p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;">

<label> </label>{$contact.description|escape:'htmlall':'UTF-8'}</p>

{/foreach}

<p class="text">

<label for="email">{l s='E-mail address'}</label>

<input type="text" id="email" name="from" value="{$email}" />

</p>

<p class="text">

<label for="phone">{l s='Phone number'}</label>

<input type="text" />

</p>

<p class="textarea">

<label for="message">{l s='Message'}</label>

<textarea id="message" name="message" rows="7" cols="35">{if isset($smarty.post.message)}{$smarty.post.message|escape:'htmlall':'UTF-8'|stripslashes}{/if}</textarea>

</p>

<p class="submit">

Link to comment
Share on other sites

  • 4 weeks later...

Do do this you need to edit contact-form.tpl and ContactController.php

 

Then you need to edit contact.html contact.txt contact_form.html & contact_form.txt in your /mails language folder.

 

If you are using more than one language you would need to do the edits there too.

 

More info HERE If it's just the phone number you want to add just do that part and ignore the others.

 

If you check my post #12 I have included the files if you don't want to do the edit yourself.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...