Jump to content

[SOLVED] Remove "Subject" from ’Contact Us’ form


Recommended Posts

no it doesn't but I've understood you in a wrong manner.

do you want to remove the dropdown menu?

than enter a hidden field with it's default value and comment it out
the hidden input field will make sure everything stays compatible with how presta works

Link to comment
Share on other sites

in themes/your theme/contact-form.tpl

replace:

{l s='Subject'}

{l s='-- Choose --'}
               {foreach from=$contacts item=contact}
{$contact.name|escape:'htmlall':'UTF-8'}
               {/foreach}


with

<input type="hidden" name="id_contact" value=1>




and let me know if it works for you

  • Like 1
Link to comment
Share on other sites

  • 8 months later...

For Prestashop 1.3 you need to delete this code :



{l s='Subject'}

{l s='-- Choose --'}
               {foreach from=$contacts item=contact}
{$contact.name|escape:'htmlall':'UTF-8'}
               {/foreach}



 
       {foreach from=$contacts item=contact}


 {$contact.description|escape:'htmlall':'UTF-8'}
       {/foreach}



then you need to check in the BO which contacts are defined and which ID they have.
A default install has always 2 contacts : Webmaster (ID=1) and Customer service (ID=2).
Choose an ID and add the following code to your template file :

<input type="hidden" name="id_contact" value=1> 



Here the ID = 1 is used as the value. So if you create a new contact with a new ID you have to change the value again to make it work.

Link to comment
Share on other sites

Hi,

Thanks for the info >> I got my contact form working.

The only thing is >> It does not send the information in the email...

I have made a contact form with surname & name, email address and message.

But It only sends out the e-mail address & the message...NOT the surname and name.

Does anyone know how I can change this. I just tried to change somehting in the contact-form.php file, but I kept getting on errors...I'm not php programmer..

Can anyone point me in the right direction?

thanks in advance!

Link to comment
Share on other sites

Changing the template and adding more fields is of course easy, but it will not be send
UNLESS you also change the contact-form.php file in the root of Prestashop.
All the contact info is stored into a cookie and when sending the cookie is read and then the email is sent.

So you need to reprogram the core file to make it working. And you said you were not an programmer so maybe you can search the forum for an example, or maybe somebody can contribute it here..

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...