Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default How to make an account signup field required

    I have found many references regarding making a field a required field, however, I have not been able to accomplish this using any of the ideas I have found here. The "solutions" noted here have been vague and none specific. The closest I have got to finding where the solution might be located is noted below. If any one could help me with this it would be greatly appreciated. I am trying to change the a Company field on my account signup page to be a required field.

    I found this code area I thought might be the area to edit. The email field is a required field, the code is shown and is quite different from the ACCONT_COMPANY code. Perhaps someone smarter than I could figure out how to do this.

    INCLUDES/MODULES/PAGES/CREATE_ACCOUNT/jscript_form_check.php

    <?php if (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0) echo ' check_input("company", ' . (int)ENTRY_COMPANY_MIN_LENGTH . ', "' . ENTRY_COMPANY_ERROR . '");' . "\n"; ?>

    <?php if ((int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH > 0) { ?>
    check_input("email_address", <?php echo (int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>");
    <?php } ?>

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: How to make an account signup field required

    To make the "Company" field required at account creation, simply change the value in your admin's Configuration->Minimum Values->Company to a value greater than 0 (the default, upon installation).

  3. #3
    Join Date
    Jun 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: How to make an account signup field required

    Thanks, I guess I was over-thinking this. I did have the min. set at 6. I was expecting a red asterisk to show up denoting that it was now required. Without the asterisk people will have to go back and enter the data when the Popup tells them they missed it. Maybe when a number > 0 is used a red asterisk should also appear to have continuity with the other required fields.

    Cheers
    James

  4. #4
    Join Date
    Jul 2012
    Posts
    16,733
    Plugin Contributions
    17

    Default Re: How to make an account signup field required

    Quote Originally Posted by textileinnovations View Post
    Thanks, I guess I was over-thinking this. I did have the min. set at 6. I was expecting a red asterisk to show up denoting that it was now required. Without the asterisk people will have to go back and enter the data when the Popup tells them they missed it. Maybe when a number > 0 is used a red asterisk should also appear to have continuity with the other required fields.

    Cheers
    James
    That is the general expectation and unfortunately is/has been missing from some of the fields and in some cases will remain visible even when it appears that the "required" field is no longer required... :) not difficult to correct but is something that unfortunately tends to need that correction...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,486
    Plugin Contributions
    88

    Default Re: How to make an account signup field required

    Quote Originally Posted by textileinnovations View Post
    Thanks, I guess I was over-thinking this. I did have the min. set at 6. I was expecting a red asterisk to show up denoting that it was now required. Without the asterisk people will have to go back and enter the data when the Popup tells them they missed it. Maybe when a number > 0 is used a red asterisk should also appear to have continuity with the other required fields.

    Cheers
    James
    There was a discussion a couple of years ago regarding automating the required fields. For right now, you can edit your template's version of your store's main language file; if you don't have the file /includes/languages/YOUR_TEMPLATE/english.php currently, copy /includes/languages/english.php to that subdirectory first. Change the line that reads:
    Code:
      define('ENTRY_COMPANY_TEXT', '');
    to the following:
    Code:
      define('ENTRY_COMPANY_TEXT', ((ENTRY_COMPANY_MIN_LENGTH > 0) ? '*' : ''));
    That change will set the "required" indicator for the company field if the company field's minimum length is greater than 0.

 

 

Similar Threads

  1. Replies: 6
    Last Post: 24 Nov 2022, 08:51 PM
  2. v139h How to make customer referral a required field during create account?
    By idc1 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Jan 2012, 09:47 PM
  3. removing extra required field in account signup
    By newagekat in forum General Questions
    Replies: 11
    Last Post: 9 Aug 2009, 08:16 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR