booblebab Posted September 8, 2009 Share Posted September 8, 2009 How do I remove the “Subject” selector thing from the contact form in PrestaShop? Do I have to edit the HTML or is there something in the Back Office?I mean on: “Contact us” > “Send a message” found at …/contact-form.php? Link to comment Share on other sites More sharing options...
Radu Posted September 8, 2009 Share Posted September 8, 2009 you can't from admingo to themes/your-theme/contact-form.tpldelete: {l s='Send a message'} Link to comment Share on other sites More sharing options...
booblebab Posted September 8, 2009 Author Share Posted September 8, 2009 Huh? Doesn't that delete the possibility of sending a message?I just want to remove the Subject option... you know, among eMail address, and Comments... what the user puts in... Link to comment Share on other sites More sharing options...
Radu Posted September 8, 2009 Share Posted September 8, 2009 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 outthe hidden input field will make sure everything stays compatible with how presta works Link to comment Share on other sites More sharing options...
booblebab Posted September 9, 2009 Author Share Posted September 9, 2009 yeah - I want to remove the drop-down thing (and the text to the left of it, saying "Subject")......but as you said - I would like to keep the functionality of prestashophow do I enter a hidden field? Link to comment Share on other sites More sharing options...
Radu Posted September 9, 2009 Share Posted September 9, 2009 in themes/your theme/contact-form.tplreplace: {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 1 Link to comment Share on other sites More sharing options...
booblebab Posted September 12, 2009 Author Share Posted September 12, 2009 I did that, and it removed the possibility of selecting it but I had to change value=2, heheThanks so much for that! Link to comment Share on other sites More sharing options...
uddhava Posted June 4, 2010 Share Posted June 4, 2010 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 More sharing options...
Daan Tol Posted June 6, 2010 Share Posted June 6, 2010 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 More sharing options...
uddhava Posted June 6, 2010 Share Posted June 6, 2010 Changing the template and adding more fields is of course easy, but it will not be sendUNLESS 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now