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

  1. Connect to server via FTP or open cPanel File Manager and go to the themes/themeXXX/ directory. Open the contact-form.tpl file (or download it in order to edit it on your computer): 
  2. Remove the Order reference field: 
  3. In the contact-form.tpl file, find the order reference text using Ctrl+ F hotkey: 
  4. You will find the order reference occurrence in this piece of code (on line 80 approximately):
<label>{l s='Order reference'}</label>

You need to remove the piece of code that is wrapped with the {if}{/if} statement:

zemez wordpress themes
{if (!isset($customerThread.id_order) || $customerThread.id_order > 0)}
<div class="form-group selector1">
<label>{l s='Order reference'}</label>
{if !isset($customerThread.id_order) && isset($is_logged) && $is_logged}
<select name="id_order" class="form-control">
<option value="0">{l s='-- Choose --'}</option>
{foreach from=$orderList item=order}
<option value="{$order.value|intval}"{if $order.selected|intval} selected="selected"{/if}>{$order.label|escape:'html':'UTF-8'}</option>
{/foreach}
</select>
{elseif !isset($customerThread.id_order) && empty($is_logged)}
<input class="form-control grey" type="text" name="id_order" id="id_order" value="{if isset($customerThread.id_order) && $customerThread.id_order|intval > 0}{$customerThread.id_order|intval}{else}{if isset($smarty.post.id_order) && !empty($smarty.post.id_order)}{$smarty.post.id_order|escape:'html':'UTF-8'}{/if}{/if}" />
{elseif $customerThread.id_order|intval > 0}
<input class="form-control grey" type="text" name="id_order" id="id_order" value="{if isset($customerThread.reference) && $customerThread.reference}{$customerThread.reference|escape:'html':'UTF-8'}{else}{$customerThread.id_order|intval}{/if}" readonly="readonly" />
{/if}
</div>
{/if}

Save the changes, re-upload the file back to your server and refresh your website: 
Remove the Attach File field. In the contact-form.tpl file, find the attach file text using Ctrl+ F hotkey: 

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

<label for="fileUpload">{l s='Attach File'}</label>

You need to remove the piece of code that is wrapped with the {if}{/if} statement:

{if $fileupload == 1}
<p class="form-group">
<label for="fileUpload">{l s='Attach File'}</label>
<input type="hidden" name="MAX_FILE_SIZE" value="{if isset($max_upload_size) && $max_upload_size}{$max_upload_size|intval}{else}2000000{/if}" />
<input type="file" name="fileUpload" id="fileUpload" class="form-control" />
</p>
{/if}

Save the changes, re-upload the file back to your server and refresh your website: 

Hopefully, this tutorial was helpful for you.

monster one