Page 1 of 2 12 LastLast
Results 1 to 10 of 40

Hybrid View

  1. #1
    Join Date
    Jan 2008
    Posts
    32
    Plugin Contributions
    0

    Default 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 '&nbsp; '; 
        }
    ?>
    
    <?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 '&nbsp; ';
        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 } ?>
    MyFitRev.com - The Fitness Peer Review

  2. #2
    Join Date
    Jul 2008
    Posts
    25
    Plugin Contributions
    0

    Default Re: How do I remove required fields from registration?



    That is EXACTLY what I needed. Thanks so much!

  3. #3
    Join Date
    Mar 2004
    Posts
    16,042
    Plugin Contributions
    5

    Default 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
    Zen cart PCI compliant Hosting

  4. #4
    Join Date
    Aug 2008
    Posts
    7
    Plugin Contributions
    0

    Default Re: How do I remove required fields from registration?

    AFO Thanks alot, you answered the question xxbb had perfectly = helped me get answer.

  5. #5
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default Re: How do I remove required fields from registration?

    Glad to help!
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

  6. #6
    Join Date
    Oct 2006
    Posts
    62
    Plugin Contributions
    0

    Default 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

  7. #7
    Join Date
    Oct 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: How do I remove required fields from registration?

    Anyone know how to remove the fields / set minimum values for the contact us form?

  8. #8
    Join Date
    Apr 2007
    Location
    Orange County, CA
    Posts
    88
    Plugin Contributions
    5

    Default 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...

  9. #9
    Join Date
    Aug 2008
    Posts
    96
    Plugin Contributions
    0

    Default 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

  10. #10
    Join Date
    Aug 2004
    Location
    New York City
    Posts
    7,174
    Plugin Contributions
    0

    Default 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.
    Mary Ellen
    I came; I saw; I Zenned
    Taking over the world... one website at a time
    Make sure brain is engaged before putting mouth in gear... or fingers to keyboard.

    Holzheimer
    Fan Odyssey

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 How can i remove unwanted fields from New Costumer Registration Form?
    By MorganWheadfields in forum Customization from the Admin
    Replies: 20
    Last Post: 7 Oct 2013, 10:09 AM
  2. How to remove address from Customer registration?
    By memerson in forum Managing Customers and Orders
    Replies: 4
    Last Post: 22 Oct 2010, 03:25 AM
  3. How to delete *required fields in registration form?
    By sart in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 1 Apr 2008, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg