Jump to content
miradoro

Adding 2 custom fields on contact form

Recommended Posts

hi

 

i added 2 fields on contact-form.tpl

 

 

<label for="fname">{l s='Name'}</label>

<input type="text" id="fname" name="fname" value="{if isset($smarty.post.fname)}{$smarty.post.fname|escape:'htmlall'|stripslashes}{/if}" />

 

<p>

<label for="company">{l s='Company'}</label>

<input type="text" id="company" name="company" value="{if isset($smarty.post.company)}{$smarty.post.company|escape:'htmlall'|stripslashes}{/if}" />

</p>

 

 

 

On contact-form.php i have:

 

if (Mail::Send(intval($cookie->id_lang), 'contact', 'Message from contact form ', array('{company}' => $_POST['company'], '{email}' => $_POST['from'], '{message}' => stripslashes($message)), $contact->email))

 

 

On contact.html

 

 

Name: {fname} <br><br>

Company: {company} <br><br>

 

I get the value for {company} to be sent on the email...

 

how do i get {fname} to show?

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More