Jump to content

Customising contact form, thanks for your help! :)


Recommended Posts

I've tried customising the contact form in the .tpl file for contact form but only managed to change the header of the contact form the subtitles as seen on my site. I'm quite troubled as to how to customise it further. I clicked around not knowing what to do. Can you please help to point me in the right direction? It would mean a lot to me! I'm also an absolute beginner at php but I do actively learn from referring to online sources.

 

screen-shot-2013-10-07-at-4-05-26-am.png

 

I want to:

 

- Important: Add new fields to the contact form: a radio field for "Grade" and a text field for "University". And have a text beside it explaining the choices.

- Would be very good if I can: rename the drop down options for "Customer service" and "Webmaster"

- If possible, attach multiple files.

- If possible, Remove order reference and product.

 

Thanks in advance for the help!

Link to comment
Share on other sites

Thanks so much! I missed that out. Do you have any idea how I can add new fields to the contact form: a radio field for "Grade" and a text field for "University". And have a text beside it explaining the choices? Is there a way to customise it?

 

 

This can easily be done by visiting Customers > Contacts in your back office. Changes names or create new contacts.

 

Marty Shue

Link to comment
Share on other sites

  • 5 weeks later...

This can easily be done by visiting Customers > Contacts in your back office. Changes names or create new contacts.

 

Marty Shue

 

HI there is no any drop down while adding contacts.

and I am getting error like

There is 1 error 
1. Please select a subject from the list provided. 

I want to use email address from customer contacts for my contact us page

 

or 

 

can anybody tell me how to get those subject headings..?

Edited by makarand (see edit history)
Link to comment
Share on other sites

HI there is no any drop down while adding contacts.

and I am getting error like

There is 1 error 
1. Please select a subject from the list provided. 

I want to use email address from customer contacts for my contact us page

 

or 

 

can anybody tell me how to get those subject headings..?

 

I solved this problem. 

There is 1 error
1. Please select a subject from the list provided.

to get subject heading you must have below code in contact form which displays subject heading in form. This allows to select contact added from BO > customers > contacts

<p class="select">
 <label for="id_contact">{l s='Subject Heading'}</label>
  {if isset($customerThread.id_contact)}
   {foreach from=$contacts item=contact}
    {if $contact.id_contact == $customerThread.id_contact}
     <input type="text" id="contact_name" name="contact_name" value="{$contact.name|escape:'htmlall':'UTF-8'}" readonly="readonly" />
     <input type="hidden" name="id_contact" value="{$contact.id_contact}" />
   {/if}
  {/foreach}
 </p>
 {else}
  <select id="id_contact" name="id_contact" onchange="showElemFromSelect('id_contact', 'desc_contact')">
  <option value="0">{l s='-- Choose --'}</option>
  {foreach from=$contacts item=contact}
   <option value="{$contact.id_contact|intval}" {if isset($smarty.post.id_contact) && $smarty.post.id_contact == $contact.id_contact}selected="selected"   {/if}>{$contact.name|escape:'htmlall':'UTF-8'}</option>
  {/foreach}
 </select>
 </p>
 <p id="desc_contact0" class="desc_contact"> </p>
  {foreach from=$contacts item=contact}
 <p id="desc_contact{$contact.id_contact|intval}" class="desc_contact" style="display:none;">
   {$contact.description|escape:'htmlall':'UTF-8'}
 </p>
 {/foreach}
{/if}
Edited by Makarand Mane (see edit history)
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...