-
How do I remove required fields from registration?
I'm doing electronic goods so...
How do I remove:
Gender (mr & mrs)
Street Address
Additional Contact Details (phone & fax)
and remove the red stars next to country, zip, city
i just don't want to screw anything up
http://www.myfitrev.com/
thanks!
-
Re: How do I remove required fields from registration?
Check under admin->configuration->customer details
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
afo
Check under admin->configuration->customer details
maybe i didn't explain it clearly
How do I remove:
Gender (mr & mrs)
Street Address
Additional Contact Details (phone & fax)
and remove the red stars next to country, zip, city
anyone know what to do? should i delete stuff in the tpl file? i don't want it to mess anything up with the database or the process of storing stuff in the db
-
Re: How do I remove required fields from registration?
- Go into your admin.
- Under configuration, find customer details.
- Turn off what you don't want
.
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
afo
- Go into your admin.
- Under configuration, find customer details.
- Turn off what you don't want
.
kinda hard if it's not there huh? that's why i'm asking for help on this.
maybe you should check your own admin > config > customer details
and see what's there and not there
Gender (mr & mrs)
Street Address
Additional Contact Details (phone & fax)
and remove the red stars next to country, zip, city
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
xbboychink
kinda hard if it's not there huh? that's why i'm asking for help on this.
maybe you should check your own admin > config > customer details
and see what's there and not there
Gender (mr & mrs)
Street Address
Additional Contact Details (phone & fax)
and remove the red stars next to country, zip, city
Gender = email salutation
Street Address = Company name & address line 2
There are also fields for fax, state and country.
You can turn the rest off in minimum values.
You can apologize later.
-
Re: How do I remove required fields from registration?
hmmm thanks but not everything i need.
i already turned minimum values to 0 before i posted but the fields are still there.
i'll figure it out.
thanks anyway tho
i'll post the code for the new tpl file when i'm done
-
Re: How do I remove required fields from registration?
First go to minimum values in admin > config > minimum values
set what you want optional or don't want at all to 0
i went to includes/templates/your_template/templates/tpl_modules_create_account.php
So all i did was delete the labels and feilds for the fieldset labeled "additional contact details" and deleted all the fields and labels for what i didn't want displaying.
to get rid of the asteriks i deleted the span class="alert" for whatever asteriks i didn't want. you can find this in the code easily.
This is my new code:
Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=create_account.<br />
* Displays Create Account form.
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_create_account.php 4822 2006-10-23 11:11:36Z drbyte $
*/
?>
<?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>
<div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<br class="clearBoth" />
<?php
if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS; ?></legend>
<div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
<?php echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"');?>
<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
</fieldset>
<?php
}
?>
<?php
if (ACCOUNT_COMPANY == 'true') {
?>
<fieldset>
<legend><?php echo CATEGORY_COMPANY; ?></legend>
<label class="inputLabel" for="company"><?php echo ENTRY_COMPANY; ?></label>
<?php echo zen_draw_input_field('company', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_company', '40') . ' id="company"') . (zen_not_null(ENTRY_COMPANY_TEXT) ? '<span class="alert">' . ENTRY_COMPANY_TEXT . '</span>': ''); ?>
</fieldset>
<?php
}
?>
<fieldset>
<legend><?php echo TABLE_HEADING_ADDRESS_DETAILS; ?></legend>
<?php
if (ACCOUNT_GENDER == 'true') {
?>
<?php echo zen_draw_radio_field('gender', 'm', '', 'id="gender-male"') . '<label class="radioButtonLabel" for="gender-male">' . MALE . '</label>' . zen_draw_radio_field('gender', 'f', '', 'id="gender-female"') . '<label class="radioButtonLabel" for="gender-female">' . FEMALE . '</label>' . (zen_not_null(ENTRY_GENDER_TEXT) ? '<span class="alert">' . ENTRY_GENDER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="firstname"><?php echo ENTRY_FIRST_NAME; ?></label>
<?php echo zen_draw_input_field('firstname', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_firstname', '40') . ' id="firstname"') . (zen_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="alert">' . ENTRY_FIRST_NAME_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="lastname"><?php echo ENTRY_LAST_NAME; ?></label>
<?php echo zen_draw_input_field('lastname', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_lastname', '40') . ' id="lastname"') . (zen_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="alert">' . ENTRY_LAST_NAME_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB; ?></label>
<?php echo zen_draw_input_field('suburb', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
<?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? ' ': ''); ?>
<br class="clearBoth" />
<?php
if (ACCOUNT_STATE == 'true') {
if ($flag_show_pulldown_states == true) {
?>
<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php
echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' ';
}
?>
<?php if ($flag_show_pulldown_states == true) { ?>
<br class="clearBoth" id="stBreak" />
<?php } ?>
<label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' ';
if ($flag_show_pulldown_states == false) {
echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
}
?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="postcode"><?php echo ENTRY_POST_CODE; ?></label>
<?php echo zen_draw_input_field('postcode', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_postcode', '40') . ' id="postcode"') . (zen_not_null(ENTRY_POST_CODE_TEXT) ? ' ': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? ' ': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_DATE_OF_BIRTH; ?></legend>
<label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
}
?>
<fieldset>
<legend><?php echo TABLE_HEADING_LOGIN_DETAILS; ?></legend>
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if ($phpBB->phpBB['installed'] == true) {
?>
<label class="inputLabel" for="nickname"><?php echo ENTRY_NICK; ?></label>
<?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' . ENTRY_NICK_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD; ?></label>
<?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>
<?php echo zen_draw_password_field('confirmation', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<fieldset>
<legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend>
<?php
if (ACCOUNT_NEWSLETTER_STATUS != 0) {
?>
<?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php } ?>
<?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?>
<br class="clearBoth" />
</fieldset>
<?php
if (CUSTOMERS_REFERRAL_STATUS == 2) {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_REFERRAL_DETAILS; ?></legend>
<label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL; ?></label>
<?php echo zen_draw_input_field('customers_referral', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_referral', '15') . ' id="customers_referral"'); ?>
<br class="clearBoth" />
</fieldset>
<?php } ?>
-
Re: How do I remove required fields from registration?
:clap:
That is EXACTLY what I needed. Thanks so much!
-
Re: How do I remove required fields from registration?
xxbb had you bothered to look in the right place
admin -> configuration -> customer details
you would see
Email Salutation false
Date of Birth false
Company false
Address Line 2 true
State true
and the rest on down the line....
the neat thing about this page is that you can turn the things that you dont want OFF just by flipping the switch to false
once again you can apologize to AFO after your done
-
Re: How do I remove required fields from registration?
AFO Thanks alot, you answered the question xxbb had perfectly = helped me get answer.
-
Re: How do I remove required fields from registration?
-
Re: How do I remove required fields from registration?
I have in Customer details:
date of birth -> true
and in Minimum values tried with 0 and blank
but it is still as a required information.
why ´n´what to do?
I want it here but as optional
-
Re: How do I remove required fields from registration?
According to the instructions in the admin, the minimum value should be blank to make optional.
-
Re: How do I remove required fields from registration?
Just been looking for this - thanks chaps
-
Re: How do I remove required fields from registration?
And I thank you also, even thou the original poster is too rude to realize they are in error.
Withholding comment on the advisability of changing core if already confused by dealing with simple TRUE/FALSE settings
-
Re: How do I remove required fields from registration?
Anyone know how to remove the fields / set minimum values for the contact us form? :cry:
-
Re: How do I remove required fields from registration?
I have a similar question that I will ask carefully to not offend. ;)
I don't mind having the Salutation included in the registration page, but I would like it to not be *Required. I would like to have it displayed, but not required, basically like Address Line 2.
Everyone that comments about turning it off in Admin-> Configuration -> Customer Details is correct, but that just removes it completely...
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
gezuvor
I have a similar question that I will ask carefully to not offend. ;)
I don't mind having the Salutation included in the registration page, but I would like it to not be *Required. I would like to have it displayed, but not required, basically like Address Line 2.
Everyone that comments about turning it off in Admin-> Configuration -> Customer Details is correct, but that just removes it completely...
See previous quote, works like a charm.
Quote:
Originally Posted by
afo
According to the instructions in the admin, the minimum value should be blank to make optional.
-
Re: How do I remove required fields from registration?
I have read all of the posts here but none tells how to remove telephone number from the required fields. TELEPHONE does not show up in config/customer details. SO for those who seem to know everything and sound just a little short with the rest of us.What am I missing? where do I deselect TELEPHONE?
www.boneyardfossilreproductions.com
-
Re: How do I remove required fields from registration?
Also setting the minimum value to 0 does not change the telephone from required to optional.
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
brodav2
I have read all of the posts here but none tells how to remove telephone number from the required fields. TELEPHONE does not show up in config/customer details. SO for those who seem to know everything and sound just a little short with the rest of us.What am I missing? where do I deselect TELEPHONE?
www.boneyardfossilreproductions.com
I am also finding it hard to figure out how to edit/remove the "Additional Contact Details", telephone field on the registration page. The red "required" * does not disappear after setting the value blank in the minimum values. I am using the latest version of Zen Cart. I would appreciate any help on how to do these edits. :smile:
-
Re: How do I remove required fields from registration?
Same problem for me - I have done something like this in the past but can't remember what i did! I have the state/province (or county) field required with an asterisk and postcode optional but for new courier i no longer need the county to be required but do need the postcode on all accounts.
I must have seen this somewhere, have tried the customer details config, so there must be a resource posted related to this.
-
Re: How do I remove required fields from registration?
Hi,
I have the same problem here (ZC1.3.8). I need the State/County field to be present but optional.
I have modified the field in Minimum Values and left it blank (I tried putting 0, it made no difference). If I turn state status to false in customer details, it disappears altogether, but set to true it become mandatory. I am trying to make it optional.
I also have a problem with some people (but not everyone!) getting a dropdown list of counties when they create an account. However the dropdown option is turned to false!
I'd rather not fiddle the the php files (but I am willing to do it if I have to).
What am I doing wrong, and can someone please help?
This is my first ZC shop and I know next to nothing, so I'm on a very steep learning curve :smile:
Thank you.
-
1 Attachment(s)
Re: How do I remove required fields from registration?
To make the field not required, you have to do 2 things.
Go to english.php and remove the *
example, for telephone:
In english.php, it says:
Quote:
define('ENTRY_TELEPHONE_NUMBER', 'Telephone:');
define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your Telephone Number must contain a minimum of ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.');
define('ENTRY_TELEPHONE_NUMBER_TEXT', '*');
change it to:
Quote:
define('ENTRY_TELEPHONE_NUMBER', 'Telephone:');
define('ENTRY_TELEPHONE_NUMBER_ERROR', 'Your Telephone Number must contain a minimum of ' . ENTRY_TELEPHONE_MIN_LENGTH . ' characters.');
define('ENTRY_TELEPHONE_NUMBER_TEXT', '');
then, go to admin>configuration> minimum values, and clear out the number for telephone.
to completely remove it from your page, you have to go to the tpl_modules_create_account
and removed the field entries.
I removed a bunch of stuff, so that the only thing left on my create account page was what's showing in my attached file.
This is what my code looks like now for tpl_modules_create_account:
PHP Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=create_account.<br />
* Displays Create Account form.
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_create_account.php 4822 2006-10-23 11:11:36Z drbyte $
*/
?>
<?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>
<div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<br class="clearBoth" />
<?php
if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS; ?></legend>
<div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
<?php echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"');?>
<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
</fieldset>
<?php
}
?>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB; ?></label>
<?php echo zen_draw_input_field('suburb', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
<?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' . ENTRY_CITY_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if (ACCOUNT_STATE == 'true') {
if ($flag_show_pulldown_states == true) {
?>
<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php
echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert">' . ENTRY_STATE_TEXT . '</span>';
}
?>
<?php if ($flag_show_pulldown_states == true) { ?>
<br class="clearBoth" id="stBreak" />
<?php } ?>
<label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo ' <span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
if ($flag_show_pulldown_states == false) {
echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
}
?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
if (ACCOUNT_FAX_NUMBER == 'true') {
?>
<br class="clearBoth" />
<label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
<?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
<?php
}
?>
</fieldset>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_DATE_OF_BIRTH; ?></legend>
<label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
}
?>
<fieldset>
<legend><?php echo TABLE_HEADING_LOGIN_DETAILS; ?></legend>
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if ($phpBB->phpBB['installed'] == true) {
?>
<label class="inputLabel" for="nickname"><?php echo ENTRY_NICK; ?></label>
<?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' . ENTRY_NICK_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD; ?></label>
<?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>
<?php echo zen_draw_password_field('confirmation', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<fieldset>
<legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend>
<?php
if (ACCOUNT_NEWSLETTER_STATUS != 0) {
?>
<?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php } ?>
<?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?>
<br class="clearBoth" />
</fieldset>
<?php
if (CUSTOMERS_REFERRAL_STATUS == 2) {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_REFERRAL_DETAILS; ?></legend>
<label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL; ?></label>
<?php echo zen_draw_input_field('customers_referral', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_referral', '15') . ' id="customers_referral"'); ?>
<br class="clearBoth" />
</fieldset>
<?php } ?>
-
Re: How do I remove required fields from registration?
I have removed the asterisks from the GENDER and deleted the alert line but I am getting a warning that I have to include salutation. How do I make the Mr. Ms. selection optional, without it throwing up this warning
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
afo
Gender = email salutation
Street Address = Company name & address line 2
There are also fields for fax, state and country.
You can turn the rest off in minimum values.
You can apologize later.
um, no country is NOT THERE! nor in minimum values or maximum values, nor in My Store, nor in any of the admin windows. I've been looking for weeks. I'm talking about setting it unrequired or not to display at all.
other things you can either turn off or on, but not just un-require.
so I think you need to apologize to him.
my client is adamant I turn off the country fields in the registration and address book, and shipping and everywhere else and THERE IS NO WAY TO DO IT IN THE ADMIN that I have found yet. she only wants to do business in the USA. why is this so hard, if not impossible to accomplish?
this should be basic. IMHO shold be one of the first things designed into the admin. set one country only in setup/install.
the only solution I could find was for shipping and payment modules by creating a zone definitino and enabling payment and shipping for the US zone only.
and that was totally silly and tricky too. I created a new zone called United States. but there is nothing to let you know that you need to tell it that United States is United States, finally noticed the definitions button and figured that out.
but that still doesn't remove the @#$@#$ country field
I even dug into the code and commented out everywhere the country field drop down was written in but that did no good as it was still required.
I have set up dozens of zen-carts. never had a problem until this client wanted this one little thing. I've been tearing my hair out!!!! help!!!
-
Re: How do I remove required fields from registration?
is there any solutions to this yet, i'm in the same situation, the client wants no country choice in the registration. Please help.
Quote:
Originally Posted by
srfrantz
um, no country is NOT THERE! nor in minimum values or maximum values, nor in My Store, nor in any of the admin windows. I've been looking for weeks. I'm talking about setting it unrequired or not to display at all.
other things you can either turn off or on, but not just un-require.
so I think you need to apologize to him.
my client is adamant I turn off the country fields in the registration and address book, and shipping and everywhere else and THERE IS NO WAY TO DO IT IN THE ADMIN that I have found yet. she only wants to do business in the USA. why is this so hard, if not impossible to accomplish?
this should be basic. IMHO shold be one of the first things designed into the admin. set one country only in setup/install.
the only solution I could find was for shipping and payment modules by creating a zone definitino and enabling payment and shipping for the US zone only.
and that was totally silly and tricky too. I created a new zone called United States. but there is nothing to let you know that you need to tell it that United States is United States, finally noticed the definitions button and figured that out.
but that still doesn't remove the @#$@#$ country field
I even dug into the code and commented out everywhere the country field drop down was written in but that did no good as it was still required.
I have set up dozens of zen-carts. never had a problem until this client wanted this one little thing. I've been tearing my hair out!!!! help!!!
-
Re: How do I remove required fields from registration?
Never mind; your client has physical products that require shipping ...
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
Merlinpa1969
xxbb had you bothered to look in the right place
admin -> configuration -> customer details
you would see
Email Salutation false
Date of Birth false
Company false
Address Line 2 true
State true
and the rest on down the line....
the neat thing about this page is that you can turn the things that you dont want OFF just by flipping the switch to false
once again you can apologize to AFO after your done
So where do you turn off the telephone number? There's no field for that, only for the fax number.
...............
Sorry, missed Page 3. Found it...thanks!!
-
Re: How do I remove required fields from registration?
This post should be pinned as a sticky - why this functionality was not built into v1.5x is beyond me!
Quote:
Originally Posted by
Samirah
To make the field not required, you have to do 2 things.
Go to english.php and remove the *
example, for telephone:
In english.php, it says:
change it to:
then, go to admin>configuration> minimum values, and clear out the number for telephone.
to completely remove it from your page, you have to go to the tpl_modules_create_account
and removed the field entries.
I removed a bunch of stuff, so that the only thing left on my create account page was what's showing in my attached file.
This is what my code looks like now for tpl_modules_create_account:
PHP Code:
<?php
/**
* Page Template
*
* Loaded automatically by index.php?main_page=create_account.<br />
* Displays Create Account form.
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_modules_create_account.php 4822 2006-10-23 11:11:36Z drbyte $
*/
?>
<?php if ($messageStack->size('create_account') > 0) echo $messageStack->output('create_account'); ?>
<div class="alert forward"><?php echo FORM_REQUIRED_INFORMATION; ?></div>
<br class="clearBoth" />
<?php
if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_PRIVACY_CONDITIONS; ?></legend>
<div class="information"><?php echo TEXT_PRIVACY_CONDITIONS_DESCRIPTION;?></div>
<?php echo zen_draw_checkbox_field('privacy_conditions', '1', false, 'id="privacy"');?>
<label class="checkboxLabel" for="privacy"><?php echo TEXT_PRIVACY_CONDITIONS_CONFIRM;?></label>
</fieldset>
<?php
}
?>
<?php
if (ACCOUNT_SUBURB == 'true') {
?>
<label class="inputLabel" for="suburb"><?php echo ENTRY_SUBURB; ?></label>
<?php echo zen_draw_input_field('suburb', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_suburb', '40') . ' id="suburb"') . (zen_not_null(ENTRY_SUBURB_TEXT) ? '<span class="alert">' . ENTRY_SUBURB_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="city"><?php echo ENTRY_CITY; ?></label>
<?php echo zen_draw_input_field('city', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_city', '40') . ' id="city"') . (zen_not_null(ENTRY_CITY_TEXT) ? '<span class="alert">' . ENTRY_CITY_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if (ACCOUNT_STATE == 'true') {
if ($flag_show_pulldown_states == true) {
?>
<label class="inputLabel" for="stateZone" id="zoneLabel"><?php echo ENTRY_STATE; ?></label>
<?php
echo zen_draw_pull_down_menu('zone_id', zen_prepare_country_zones_pull_down($selected_country), $zone_id, 'id="stateZone"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo '##<span class="alert">' . ENTRY_STATE_TEXT . '</span>';
}
?>
<?php if ($flag_show_pulldown_states == true) { ?>
<br class="clearBoth" id="stBreak" />
<?php } ?>
<label class="inputLabel" for="state" id="stateLabel"><?php echo $state_field_label; ?></label>
<?php
echo zen_draw_input_field('state', '', zen_set_field_length(TABLE_ADDRESS_BOOK, 'entry_state', '40') . ' id="state"');
if (zen_not_null(ENTRY_STATE_TEXT)) echo '##<span class="alert" id="stText">' . ENTRY_STATE_TEXT . '</span>';
if ($flag_show_pulldown_states == false) {
echo zen_draw_hidden_field('zone_id', $zone_name, ' ');
}
?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="country"><?php echo ENTRY_COUNTRY; ?></label>
<?php echo zen_get_country_list('zone_country_id', $selected_country, 'id="country" ' . ($flag_show_pulldown_states == true ? 'onchange="update_zone(this.form);"' : '')) . (zen_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="alert">' . ENTRY_COUNTRY_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
if (ACCOUNT_FAX_NUMBER == 'true') {
?>
<br class="clearBoth" />
<label class="inputLabel" for="fax"><?php echo ENTRY_FAX_NUMBER; ?></label>
<?php echo zen_draw_input_field('fax', '', 'id="fax"') . (zen_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="alert">' . ENTRY_FAX_NUMBER_TEXT . '</span>': ''); ?>
<?php
}
?>
</fieldset>
<?php
if (ACCOUNT_DOB == 'true') {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_DATE_OF_BIRTH; ?></legend>
<label class="inputLabel" for="dob"><?php echo ENTRY_DATE_OF_BIRTH; ?></label>
<?php echo zen_draw_input_field('dob','', 'id="dob"') . (zen_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="alert">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
}
?>
<fieldset>
<legend><?php echo TABLE_HEADING_LOGIN_DETAILS; ?></legend>
<label class="inputLabel" for="email-address"><?php echo ENTRY_EMAIL_ADDRESS; ?></label>
<?php echo zen_draw_input_field('email_address', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_email_address', '40') . ' id="email-address"') . (zen_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="alert">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if ($phpBB->phpBB['installed'] == true) {
?>
<label class="inputLabel" for="nickname"><?php echo ENTRY_NICK; ?></label>
<?php echo zen_draw_input_field('nick','','id="nickname"') . (zen_not_null(ENTRY_NICK_TEXT) ? '<span class="alert">' . ENTRY_NICK_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
}
?>
<label class="inputLabel" for="password-new"><?php echo ENTRY_PASSWORD; ?></label>
<?php echo zen_draw_password_field('password', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-new"') . (zen_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<label class="inputLabel" for="password-confirm"><?php echo ENTRY_PASSWORD_CONFIRMATION; ?></label>
<?php echo zen_draw_password_field('confirmation', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_password', '20') . ' id="password-confirm"') . (zen_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="alert">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<fieldset>
<legend><?php echo ENTRY_EMAIL_PREFERENCE; ?></legend>
<?php
if (ACCOUNT_NEWSLETTER_STATUS != 0) {
?>
<?php echo zen_draw_checkbox_field('newsletter', '1', $newsletter, 'id="newsletter-checkbox"') . '<label class="checkboxLabel" for="newsletter-checkbox">' . ENTRY_NEWSLETTER . '</label>' . (zen_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="alert">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php } ?>
<?php echo zen_draw_radio_field('email_format', 'HTML', ($email_format == 'HTML' ? true : false),'id="email-format-html"') . '<label class="radioButtonLabel" for="email-format-html">' . ENTRY_EMAIL_HTML_DISPLAY . '</label>' . zen_draw_radio_field('email_format', 'TEXT', ($email_format == 'TEXT' ? true : false), 'id="email-format-text"') . '<label class="radioButtonLabel" for="email-format-text">' . ENTRY_EMAIL_TEXT_DISPLAY . '</label>'; ?>
<br class="clearBoth" />
</fieldset>
<?php
if (CUSTOMERS_REFERRAL_STATUS == 2) {
?>
<fieldset>
<legend><?php echo TABLE_HEADING_REFERRAL_DETAILS; ?></legend>
<label class="inputLabel" for="customers_referral"><?php echo ENTRY_CUSTOMERS_REFERRAL; ?></label>
<?php echo zen_draw_input_field('customers_referral', '', zen_set_field_length(TABLE_CUSTOMERS, 'customers_referral', '15') . ' id="customers_referral"'); ?>
<br class="clearBoth" />
</fieldset>
<?php } ?>
-
Re: How do I remove required fields from registration?
Count me in as another person having issues with this. Here's what I've done.
Admin>Configuration>Minimum Values
First Name 2
Nick Name 0
Last Name 2
Date of birth 0
E-Mail Address 6
Street Address 0
Company 0
Post Code 0
City 0
State 0
Telephone Number 0
Password 5
-----
Admin>Configuration>Customer Details
Email Salutation false
Date of Birth false
Company false
Address Line 2 false
State false
State - Always display as pulldown? false
Create Account Default Country ID blank (no option to make this false)
Fax Number false
-----
In includes/templates/MY_TEMPLATE/templates/tpl_modules_create_account.php I have removed all the options I do not want, and have left in First name, Last name, Email and Password.
I have removed the * from all options I do not want required in includes/languages/MY_TEMPLATE/english.php
When signing up for a new account I get the following warning...
You must select a country from the Countries pull down menu.
The Password Confirmation must match your Password.
I can live with putting back password confirmation if I have to (although why I have to is beyond me), but why can I not turn off country? I run a purely digital store (only download items) so have no need for shipping, therefore have no need to know what country a person comes from.
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
Xena
... I run a purely digital store (only download items) so have no need for shipping, therefore have no need to know what country a person comes from.
That's the environment for which my plugin Minimum Customer Account Information was designed; no country is required.
-
Re: How do I remove required fields from registration?
-
Re: How do I remove required fields from registration?
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
afo
Gender = email salutation
Street Address = Company name & address line 2
There are also fields for fax, state and country.
You can turn the rest off in minimum values.
You can apologize later.
i'm having the same problem and found out how to remove all fields from registration EXCEPT for country. i even removed it from the display by changing the coding but still when you try to register, you get an error that the country code is not filled in. how do i remove that?
-
Re: How do I remove required fields from registration?
I would like to know if someone can help me with the registration page. After adding all necessary fields, I keep getting a message that tells me * Required information
and it shows country needs to be populated. However United States is already in that field. I have checked the countries module and United States is listed with USA and US as ISO 2/3. I am hoping there is a simple fix to resolve this issue. It was working just a couple of days ago and now it is not allowing people to register for the site.
I am using 1.5.6 Westminster Template. I have added recaptcha but this was added months ago and has never been a problem before.
Any suggestions would be greatly appreciated. For reference, the website is http://pfcind.com.
Thank you.
-
Re: How do I remove required fields from registration?
Quote:
Originally Posted by
creyesx6
I would like to know if someone can help me with the registration page. After adding all necessary fields, I keep getting a message that tells me * Required information
and it shows country needs to be populated. However United States is already in that field. I have checked the countries module and United States is listed with USA and US as ISO 2/3. I am hoping there is a simple fix to resolve this issue. It was working just a couple of days ago and now it is not allowing people to register for the site.
I am using 1.5.6 Westminster Template. I have added recaptcha but this was added months ago and has never been a problem before.
Any suggestions would be greatly appreciated. For reference, the website is
http://pfcind.com.
Thank you.
Last I checked the hard code needs to match the java doing the same thing - checking for required fields. You can turn off or set the admin to 0 but if there's anything else checking that page for requirements it too will need to be modified.
-
Re: How do I remove required fields from registration?
Well you can turn off ALMOST everything from this page.. admin -> configuration -> customer details
I don't see any other way besides editing.. includes/templates/your_template/templates/tpl_modules_create_account.php to remove the phone number. I don't want the phone number required on create account or contact us or ask a question. Is there any other way besides editing the .php files for these?
-
Re: How do I remove required fields from registration?
Haha, nevermind. I didn't see all of the other posts on this thread. Only saw page 1 not the other few pages, oops. :bangin: