| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Required fields | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Required fields
Please could someone tell me how to remove/edit the required field tabs in contact us also in checkout,
Many Thanks |
|||||||
#2
|
|||||||
|
|||||||
I am wondering the same thing.
Seems silly to require people to enter their address just to ask you a question (and then to make it even more futile it doesn't even register them as a user). I would just dump it and make my own contact page, but I like people being able to enter that info, just not being required to. |
|||||||
#3
|
|||||||
|
|||||||
This was easier than I thought once I found the right file. The contact mail sending is done by include/help.php. All you must do to make options not required is change code:
Code:
to: Code:
Now no address info is required. Emails go thru perfectly they just dont have any information in the fields that are not filled out that are no longer required. Hope that is what you were looking for. |
|||||||
#4
|
|||||||
|
|||||||
Where is the include file?
How can I find the file: include/help.php ?
|
|||||||
#5
|
|||||||||
|
|||||||||
ftp into your server and look through the files
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#6
|
|||||||
|
|||||||
Easier way to remove required fields in contact form
The way to remove required fields from the contact form is to edit the include/help.php file and the skin1/help/contact.tpl file as mentioned in the previous posts.
However, I didn't want to edit the PHP file for fear of upgrade issues/headaches in the future. My method is to do this by adding some Javascript to the contact.tpl file. The idea is this: 1) remove the asterisks of the fields you don't want required anymore 2) add our own javascript validation function that denies submission of the form if our required fields are not filled in 3) in that same validation function, set the fields that we no longer want required to a non-empty string if the user did not fill it out. The javascript function looks like this: Code:
We have to change our submit button to call that validation function from: to My complete contact.tpl file looks like this. Code:
Fun, eh? Gary |
|||||||
#7
|
|||||||
|
|||||||
cool scripting
Hey Gary,
looks cool... Does this method kinda bypass the required fields in the help.php file? Will this work if I want to remove some of the fields in the contact.tpl file? or do all the fields have to stay there if u want it to work? thanks, Ben |
|||||||
#8
|
|||||||
|
|||||||
Re: cool scripting
Quote:
Kind of... instead of BYPASSING the idea is to go AROUND the required fields in help.php by using JS to set the ones we DON'T want to be required to a non-empty string. If you want to remove a couple of fields (even the required ones), all you have to do is change them from text fields to hidden input fields. Gary |
|||||||
#9
|
|||||||
|
|||||||
From what I have read, all these mod are about removing some unwanted fields in the contact us form, How do I add some fields if I want to use this contact us form for music student application form, I need the student to enter what time they want to book, what class, etc
__________________
XCart 4.0.18 Gold X-Giftregistry Neon light Fashion mosaic Tabbed product menu |
|||||||
#10
|
|||||||
|
|||||||
This is a very old thread. In version 4, you can just go to General Settings/Contact Us Options and add as many extra fields as you want by using the dialog at the bottom. Same goes for the registration forms.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|