Categories

Featured templates

PrestaShop 1.6.x. How to remove contact form fields (i.e. Order Reference)

Sandra Kim August 18, 2016
Rating: 5.0/5. From 4 votes.
Please wait...

This tutorial provides an explanation on how to remove contact form fields in PrestaShop 1.6.x.

In order to remove contact form fields, you need to perform the following steps:

  1. Log into your Control Hosting Panel (cPanel) on a server.

  2. Locate the File Manager and go to your website folder (you can perform the next steps via your FTP as well).

  3. Navigate to the themes/themeXXX/ directory, and open the contact-form.tpl file (or download it in order to edit it on your computer).

    prestashop_how_to_remove_contact_form_fields_1
  4. For instance, let’s remove the Order reference field.

    prestashop_how_to_remove_contact_form_fields_2

    Use the search function in your code editor (Ctrl+F keys on your keyboard), and type order reference text as a search parameter.

    prestashop_how_to_remove_contact_form_fields_3

    You will find the order reference occurrence in this piece of code (on the line 80 approximately):

    	
    

    This code is wrapped with the {if}{/if} statement. You need to remove the entire {if}{/if} statement (lines 78-94 approximately):

    	{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
    	
    {if !isset($customerThread.id_order) && isset($is_logged) && $is_logged} {elseif !isset($customerThread.id_order) && empty($is_logged)} {elseif $customerThread.id_order|intval > 0} {/if}
    {/if}
    prestashop_how_to_remove_contact_form_fields_4
  5. Save your changes, re-upload the file back to your server, and refresh your website. The Order reference field has been removed from the contact form.

    prestashop_how_to_remove_contact_form_fields_5
  6. You can remove the rest of the fields that you do not need in the same way. For example, let’s review how to remove the Attach File field.

    Use your code editor search function, and type attach file text as a search parameter.

    prestashop_how_to_remove_contact_form_fields_6

    You will find the attach file occurrence in this piece of code (on the line 98 approximately):

    			
    		

    This code is wrapped with the {if}{/if} statement as well. You need to remove the entire {if}{/if} statement (lines 96-102 approximately):

    			{if $fileupload == 1}
    			

    {/if}
    prestashop_how_to_remove_contact_form_fields_7
  7. Save your changes, re-upload the file back to your server, and refresh your website. The Attach File field has been removed from the contact form too.

    prestashop_how_to_remove_contact_form_fields_8

Now you know how to remove contact form fields in PrestaShop 1.6.x.

Feel free to check the detailed video tutorial below:

PrestaShop 1.6.x. How to remove contact form fields (i.e. Order Reference)

We also have a collection of other Prestashop themes that may get you interested.

Best Prestashop Themes
This entry was posted in PrestaShop Tutorials and tagged contact form, fields, Prestashop, remove. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket