Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Editing Contact us form not working! help please!

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-29-2004, 06:26 PM
 
tidalx tidalx is offline
 

Newbie
  
Join Date: May 2004
Posts: 8
 

Default Editing Contact us form not working! help please!

Hi,

I am just started and wanted to change the contact us form to less field. All I needed is the person's name, email address, subject, and the message. I had read the forums here but can't seem to find a answer my problem.

Here is my problem, the apprearence looks just how I wanted after deleting some items in the contactus template. Test 1, hit submit button, nothing happen, it should go to another page saying your message had sent (something like it), but it stay on the same page. Checked, no email had sent. So, what did I deleted which I shouldn't have. Help please.

Here is a copy of the code after I take out the things that I don't need.

Code:
{* $Id: contactus.tpl,v 1.19.4.1 2004/04/09 07:07:27 svowl Exp $ *} {literal} <script> function checkEmailAddress(field) { var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi); if (goodEmail) { return true; } else { alert("E-mail address is invalid! Please correct"); field.focus(); field.select(); return false; } } </script> {/literal} {if $smarty.get.mode eq "update"} {$lng.txt_contact_us_header} {/if} {capture name=dialog} {if $smarty.get.mode eq "update"} <table width=100% border=0 cellspacing=0 cellpadding=2> <form action="help.php?section=contactus&mode=update&action=contactus" method=post name=registerform> <tr valign=middle> <td class=FormButton>{$lng.lbl_title}</td> <td><font class=Star>*</font></td> <td nowrap> <select name=title> {section name=title loop=$name_titles} <option {if $userinfo.title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</option> {/section} </select> </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_first_name}</td> <td><font class=Star>*</font></td> <td nowrap> <input type=text name=firstname size=32 maxlength=32 value="{$userinfo.firstname}"> {if $fillerror ne "" and $userinfo.firstname eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_last_name}</td> <td><font class=Star>*</font></td> <td nowrap> <input type=text name=lastname size=32 maxlength=32 value="{$userinfo.lastname}"> {if $fillerror ne "" and $userinfo.lastname eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_email}</td> <td><font class=Star>*</font></td> <td nowrap> <input type=text name=email size=32 maxlength=128 value="{$userinfo.email}"> {if $fillerror ne "" and $userinfo.email eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_department}</td> <td><font class=Star>*</font></td> <td nowrap> <select name=department> <option value="All" selected>{$lng.lbl_all}</option> <option value="Partners">{$lng.lbl_partners}</option> <option value="Marketing / publicity">{$lng.lbl_marketing_publicity}</option> <option value="Webdesign">{$lng.lbl_web_design}</option> <option value="Sales">{$lng.lbl_sales}</option> </select> </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_subject}</td> <td><font class=Star>*</font></td> <td nowrap> <input type=text name=subject size=32 maxlength=128 value="{$userinfo.subject}"> {if $fillerror ne "" and $userinfo.subject eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr> <tr valign=middle> <td class=FormButton>{$lng.lbl_message}</td> <td><font class=Star>*</font></td> <td nowrap> <textarea cols=48 rows=12 name=body>{$userinfo.body}</textarea> {if $fillerror ne "" and $userinfo.body eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr> <tr valign=middle> <td></td> <td></td> <td nowrap> {include file="buttons/submit.tpl"} </td> </tr> <input type=hidden name=usertype value="{$usertype}"> </form> </table> {else} {$lng.txt_contact_us_sent} {/if} {/capture} {include file="dialog.tpl" title=$lng.lbl_contact_us content=$smarty.capture.dialog extra="width=100%"}

Thanks,
Littles
Reply With Quote
  #2  
Old 06-02-2004, 05:39 AM
  LittleB's Avatar 
LittleB LittleB is offline
 

Advanced Member
  
Join Date: May 2004
Location: Australia
Posts: 52
 

Default I'm having similar probs...

Hi gurus, I'm also pretty new at this and would like to adjust my contact form. I still wish to display all the fields I just don't want them all to be compulsory. eg *name, address, country, phone, *email, *subject, *message, etc... (where* = compulsory field)
What have you got? Can any do this in layish terms?
Cheers
LittleB
__________________
X-cart Gold 4.6.1 - Yep current for a bit
www.littlebruiser.com.au - "cool stuff for kids"
Reply With Quote
  #3  
Old 06-13-2004, 06:28 AM
 
GM GM is offline
 

eXpert
  
Join Date: Mar 2004
Location: Canada
Posts: 293
 

Default

Hi Guys, This is not always a wise move. It is better to make new contact forms with the info you want... but if you really want to do it... here it is.

First edit skin1/help/contactus.tpl

In this example, I will remove the "Phone" field:

Select and cut
Code:
<tr valign=middle> <td class=FormButton>{$lng.lbl_phone}</td> <td><font class=Star>*</font></td> <td nowrap> <input type=text name=phone size=32 maxlength=32 value="{$userinfo.phone}"> {if $fillerror ne "" and $userinfo.phone eq ""}<font class=Star>&lt;&lt;</font>{/if} </td> </tr>

Then open include/help.php and remove this:
Code:
empty($contact["phone"]) ||

Done!
__________________
v. 4.0.14 (GM Style)
O.S. Linux
Build Your Own Diamond Ring
Reply With Quote
  #4  
Old 06-14-2004, 02:48 AM
  LittleB's Avatar 
LittleB LittleB is offline
 

Advanced Member
  
Join Date: May 2004
Location: Australia
Posts: 52
 

Default

Thanks for you tip. It does sound like a better idea to make a new one - then I always have the full one to fall back on.

Ok if I was to make a new one... would I copy the existing, cut out the sections I don't want then save as a version. But then where do I put..?

Sorry to sound so basic... but I wouldn't have a clue.
Cheers
LittleB
__________________
X-cart Gold 4.6.1 - Yep current for a bit
www.littlebruiser.com.au - "cool stuff for kids"
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:56 AM.

   

 
X-Cart forums © 2001-2020