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

Mandatory fields on the Contact Us form

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-05-2004, 09:37 AM
 
Risky Risky is offline
 

Member
  
Join Date: Jan 2004
Posts: 26
 

Default Mandatory fields on the Contact Us form

Can anyone advise me on how I can stop a field on the Contact Us form, from being mandatory.

For example, I don't really need to know the person's full address, and I feel that making this compulsory will only frustrate a potential customer, with the risk of losing them.

I really only need to know his name, email address, email subject and his/her message.

Grateful for your advice. Thanks, Robert (V 3.5.3)
Reply With Quote
  #2  
Old 04-07-2004, 01:00 AM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

edit include/help.php:

Code:
$fillerror = (empty($contact["firstname"]) || empty($contact["lastname"]) || empty($contact["b_address"]) || empty($contact["b_city"]) || empty($contact["b_country"]) || empty($contact["b_zipcode"]) || empty($contact["phone"]) || empty($contact["email"]) || empty($contact["subject"]) || empty($contact["body"]));

Update the code accordingly
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #3  
Old 04-10-2004, 02:02 AM
 
Risky Risky is offline
 

Member
  
Join Date: Jan 2004
Posts: 26
 

Default

Hi Boomer,

Thanks for your response .. which I am anxious to try out .. please just guide me to where I find Include/help.php .... is this accessed from the Admin area? I've looked around the Templates area, which I am getting more familiar with, but can't find these files with the .php extension.

Sorry .. this must be sooo basic.

Many thanks
Robert
__________________
Risky
V3.5.3
With Options-based inventory tracking mod, by X-cart
Reply With Quote
  #4  
Old 04-10-2004, 02:38 AM
  leed's Avatar 
leed leed is offline
 

Senior Member
  
Join Date: Nov 2002
Location: England (UK)
Posts: 128
 

Default help.php

It's in the include directory in your main x-cart directory.
e.g. If your x-cart is installed in shop
then help.php will be in shop/include

LeeD
__________________
Why a mouse when it spins ......
X-Cart Gunslingers - For Hire!!
http://forum.x-cart.com/viewtopic.php?t=8615
Reply With Quote
  #5  
Old 04-13-2004, 10:56 AM
 
Risky Risky is offline
 

Member
  
Join Date: Jan 2004
Posts: 26
 

Default

Thanks people for your help .. your suggestions greatly helped, but it wasn't the full story. Here's what else is required if it helps anyone else.

If you just edit help.php, and the customer accidentally still omits any of the fields you have left as mandatory, there is code in the help/contactus.tpl that also checks and marks fields on the Contact Us form that are mandatory and it will still find the omissions.

So, you need to edit the tpl file to remove or comment out these checks on the fields that aren't mandatory, PLUS you need to remove the red asterisks that mark those same fields as being mandatory (for the customer to see). I simply replaced the "*" characters with "&nbsp" (which will make it easier if I ever want to reinstate some/all of my changes later on).

Now, the form looks and works exactly like I wanted, with only a few mandatory fields.
__________________
Risky
V3.5.3
With Options-based inventory tracking mod, by X-cart
Reply With Quote
  #6  
Old 08-31-2004, 12:34 AM
 
rgbdna rgbdna is offline
 

Advanced Member
  
Join Date: Jul 2004
Posts: 31
 

Default One step further?

Hi Risky,

Thanks for the followup. I was wondering, does anyone know how to do this on the checkout page...registration. Where it asks for your name, title, billing and shipping address...etc?

I can see that this page is built from a series of includes.

So for example if I did not want to make EMAIL required during checkout?

Thanks,

rgbdna
__________________
v.3.10.5 Great creative direction is clarity cleverly delivered.
Reply With Quote
  #7  
Old 08-31-2004, 07:20 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default Re: One step further?

Quote:
Originally Posted by rgbdna
Hi Risky,

Thanks for the followup. I was wondering, does anyone know how to do this on the checkout page...registration. Where it asks for your name, title, billing and shipping address...etc?

I can see that this page is built from a series of includes.

So for example if I did not want to make EMAIL required during checkout?

Thanks,

rgbdna

include/register.php
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
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 02:27 AM.

   

 
X-Cart forums © 2001-2020