Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    help question Create Required Referral Field

    I am trying to make my referral field required. I know the customers won't always be honest when they fill in the text box, but the bossman wants this feature. I went to my includes/modules/pages/create_account/jscript_form_check.php and added the following code:
    Code:
    // referral required begin
    
      check_input("customers_referral", "", "<?php echo ENTRY_CUSTOMERS_REFERRAL_ERROR; ?>");
       
    // referral required end
    Then I went to includes/languages/MYTEMPLATE/english.php and added the following bit of code:
    Code:
      
    define('ENTRY_CUSTOMERS_REFERRAL_ERROR', 'Please let us know how you heard about StudioStyles.net');
    When I view my source, it looks like everything is being called out properly, but the required field does not seem to be working. Anyone have an idea?

    Login URL:
    John L.
    MultiMedia Designer

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Create Required Referral Field

    Trace down one of the other required fields such as:
    street_address

    You have not added anything to the validation of the information you only added the flag to tell the customer the field is required ...

    Peek in the file:
    jscript_form_check.php

    for login and create_account ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    help question Re: Create Required Referral Field

    Ajeh,

    Thanks for the tip, but Im not seeing login or create_account in my jscript_form_check.php file. Perhaps this is because I have split login mod...
    John L.
    MultiMedia Designer

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Create Required Referral Field

    /includes/pages/login

    /includes/pages/create_account

    Are you looking at the right files?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    help question Re: Create Required Referral Field

    Im editing the one in create_account dir. Ive copied the street_address line from there and modified it to get the customers_referral_error message. Here's my page source JS:
    Code:
    <script language="javascript" type="text/javascript"><!--
    
    var form = "";
    
    var submitted = false;
    
    var error = false;
    
    var error_message = "";
    
    function check_input(field_name, field_size, message) {
    
      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
    
        var field_value = form.elements[field_name].value;
    
        if (field_value == '' || field_value.length < field_size) {
    
          error_message = error_message + "* " + message + "\n";
    
          error = true;
    
        }
    
      }
    
    }
    
    function check_radio(field_name, message) {
    
      var isChecked = false;
    
      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
    
        var radio = form.elements[field_name];
    
        for (var i=0; i<radio.length; i++) {
    
          if (radio[i].checked == true) {
    
            isChecked = true;
    
            break;
    
          }
    
        }
    
        if (isChecked == false) {
    
          error_message = error_message + "* " + message + "\n";
    
          error = true;
    
        }
    
      }
    
    }
    
    function check_select(field_name, field_default, message) {
    
      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
    
        var field_value = form.elements[field_name].value;
    
        if (field_value == field_default) {
    
          error_message = error_message + "* " + message + "\n";
    
          error = true;
    
        }
    
      }
    
    }
    
    function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
    
      if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
    
        var password = form.elements[field_name_1].value;
    
        var confirmation = form.elements[field_name_2].value;
    
        if (password == '' || password.length < field_size) {
    
          error_message = error_message + "* " + message_1 + "\n";
    
          error = true;
    
        } else if (password != confirmation) {
    
          error_message = error_message + "* " + message_2 + "\n";
    
          error = true;
    
        }
    
      }
    
    }
    
    
    
    function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
    
      if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
    
        var password_current = form.elements[field_name_1].value;
    
        var password_new = form.elements[field_name_2].value;
    
        var password_confirmation = form.elements[field_name_3].value;
    
    
    
        if (password_current == '' || password_current.length < field_size) {
    
          error_message = error_message + "* " + message_1 + "\n";
    
          error = true;
    
        } else if (password_new == '' || password_new.length < field_size) {
    
          error_message = error_message + "* " + message_2 + "\n";
    
          error = true;
    
        } else if (password_new != password_confirmation) {
    
          error_message = error_message + "* " + message_3 + "\n";
    
          error = true;
    
        }
    
      }
    
    }
    
    
    
    function check_form(form_name) {
    
      if (submitted == true) {
    
        alert("This form has already been submitted. Please press OK and wait for this process to be completed.");
    
        return false;
    
      }
    
      error = false;
    
      form = form_name;
    
      error_message = "Errors have occurred during the processing of your form.\n\nPlease make the following corrections:\n\n";
    
      check_radio("gender", "Please choose a salutation.");
    
      check_input("firstname", 2, "Is your first name correct? Our system requires a minimum of 2 characters. Please try again.");
    
      check_input("lastname", 2, "Is your last name correct? Our system requires a minimum of 2 characters. Please try again.");
    
      check_input("email_address", 6, "Is your email address correct? It should contain at least 6 characters. Please try again.");
    
      check_input("street_address", 5, "Your Street Address must contain a minimum of 5 characters.");
    
      // check_input("postcode", 0, "Your Post/ZIP Code must contain a minimum of 0 characters.");
    
      check_input("city", 2, "Your City must contain a minimum of 2 characters.");
    
      if (!form.state.disabled && form.zone_id.value > 0) check_input("state", 0, "Your State must contain a minimum of 0 characters.");
    
      check_select("country", "", "You must select a country from the Countries pull down menu.");
    
      check_input("telephone", 10, "Your Telephone Number must contain a minimum of 10 characters.");
    
      check_password("password", "confirmation", 5, "Your Password must contain a minimum of 5 characters.", "The Password Confirmation must match your Password.");
    
      check_password_new("password_current", "password_new", "password_confirmation", 5, "Your Password must contain a minimum of 5 characters.", "Your new Password must contain a minimum of 5 characters.", "The Password Confirmation must match your new Password.");
    
    // referral required begin
    
      check_input("customers_referral", 2, "Please let us know how you heard about StudioStyles.net");
       
    // referral required end
    
    
      if (error == true) {
    
        alert(error_message);
    
        return false;
    
      } else {
    
        submitted = true;
    
        return true;
      }
    }
    and here's the HTML:
    Code:
    <fieldset>
    
    <legend>Were You Referred to Us?</legend>
    <label class="inputLabel" for="customers_referral">Referral Source:</label>
    <input type="text" name="customers_referral" value="" size = "16" maxlength= "32" id="customers_referral" /><span class="alert">*</span><br class="clearBoth" />
    </fieldset>
    John L.
    MultiMedia Designer

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Create Required Referral Field

    How come you are not using the constants and are using physical values?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    Default Re: Create Required Referral Field

    Im not sure what your mean there, Ajeh. I copied the street-address js and changed out street address with customers_referral. im not sure if this was a booboo or not...
    John L.
    MultiMedia Designer

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Create Required Referral Field

    What version of Zen Cart are you working on?

    Have these files ever been touched before?

    This is my file for jscript_form_check.php in v1.3.7:
    PHP Code:
    <?php
    /**
     * jscript_form_check
     *
     * @package page
     * @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: jscript_form_check.php 5315 2006-12-21 02:24:08Z drbyte $
     */
    ?>
    <script language="javascript" type="text/javascript"><!--
    var form = "";
    var submitted = false;
    var error = false;
    var error_message = "";

    function check_input(field_name, field_size, message) {
      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
        if (field_size == 0) return;
        var field_value = form.elements[field_name].value;

        if (field_value == '' || field_value.length < field_size) {
          error_message = error_message + "* " + message + "\n";
          error = true;
        }
      }
    }

    function check_radio(field_name, message) {
      var isChecked = false;

      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
        var radio = form.elements[field_name];

        for (var i=0; i<radio.length; i++) {
          if (radio[i].checked == true) {
            isChecked = true;
            break;
          }
        }

        if (isChecked == false) {
          error_message = error_message + "* " + message + "\n";
          error = true;
        }
      }
    }

    function check_select(field_name, field_default, message) {
      if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
        var field_value = form.elements[field_name].value;

        if (field_value == field_default) {
          error_message = error_message + "* " + message + "\n";
          error = true;
        }
      }
    }

    function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
      if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
        var password = form.elements[field_name_1].value;
        var confirmation = form.elements[field_name_2].value;

        if (password == '' || password.length < field_size) {
          error_message = error_message + "* " + message_1 + "\n";
          error = true;
        } else if (password != confirmation) {
          error_message = error_message + "* " + message_2 + "\n";
          error = true;
        }
      }
    }

    function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
      if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
        var password_current = form.elements[field_name_1].value;
        var password_new = form.elements[field_name_2].value;
        var password_confirmation = form.elements[field_name_3].value;

        if (password_current == '' || password_current.length < field_size) {
          error_message = error_message + "* " + message_1 + "\n";
          error = true;
        } else if (password_new == '' || password_new.length < field_size) {
          error_message = error_message + "* " + message_2 + "\n";
          error = true;
        } else if (password_new != password_confirmation) {
          error_message = error_message + "* " + message_3 + "\n";
          error = true;
        }
      }
    }

    function check_form(form_name) {
      if (submitted == true) {
        alert("<?php echo JS_ERROR_SUBMITTED?>");
        return false;
      }

      error = false;
      form = form_name;
      error_message = "<?php echo JS_ERROR?>";

    <?php if (ACCOUNT_GENDER == 'true') echo '  check_radio("gender", "' ENTRY_GENDER_ERROR '");' "\n"?>

    <?php if ((int)ENTRY_FIRST_NAME_MIN_LENGTH 0) { ?>
      check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH?>, "<?php echo ENTRY_FIRST_NAME_ERROR?>");
    <?php ?>
    <?php 
    if ((int)ENTRY_LAST_NAME_MIN_LENGTH 0) { ?>
      check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH?>, "<?php echo ENTRY_LAST_NAME_ERROR?>");
    <?php ?>

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

    <?php if ((int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH 0) { ?>
      check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR?>");
    <?php ?>
    <?php 
    if ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH 0) { ?>
      check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR?>");
    <?php ?>
    <?php 
    if ((int)ENTRY_POSTCODE_MIN_LENGTH 0) { ?>
      check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH?>, "<?php echo ENTRY_POST_CODE_ERROR?>");
    <?php ?>
    <?php 
    if ((int)ENTRY_CITY_MIN_LENGTH 0) { ?>
      check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH?>, "<?php echo ENTRY_CITY_ERROR?>");
    <?php ?>

    <?php if (ACCOUNT_STATE == 'true') echo '  if (!form.state.disabled && form.zone_id.value == "") check_input("state", ' ENTRY_STATE_MIN_LENGTH ', "' ENTRY_STATE_ERROR '")' "\n" '  else if (form.state.disabled) check_select("zone_id", "", "' ENTRY_STATE_ERROR_SELECT '");' "\n"?>

      check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR?>");

    <?php if ((int)ENTRY_TELEPHONE_MIN_LENGTH 0) { ?>
      check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH?>, "<?php echo ENTRY_TELEPHONE_NUMBER_ERROR?>");
    <?php ?>

    <?php if ((int)ENTRY_PASSWORD_MIN_LENGTH 0) { ?>
      check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH?>, "<?php echo ENTRY_PASSWORD_ERROR?>", "<?php echo ENTRY_PASSWORD_ERROR_NOT_MATCHING?>");
      check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH?>, "<?php echo ENTRY_PASSWORD_ERROR?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING?>");
    <?php ?>

      if (error == true) {
        alert(error_message);
        return false;
      } else {
        submitted = true;
        return true;
      }
    }
    //--></script>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Sep 2006
    Location
    Jacksonville, FL
    Posts
    236
    Plugin Contributions
    0

    help question Re: Create Required Referral Field

    I compared my code against yours and other than adding the customers_referral field, its that same.
    Code:
    <?php
    
    /**
    
     * jscript_form_check
    
     *
    
     * @package page
    
     * @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: jscript_form_check.php 4237 2006-08-24 10:00:24Z drbyte $
    
     */
    
    ?>
    
    <script language="javascript" type="text/javascript"><!--
    
    var form = "";
    
    var submitted = false;
    
    var error = false;
    
    var error_message = "";
    
    
    
    function check_input(field_name, field_size, message) {
    
     if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
       if (field_size == 0) return;
       var field_value = form.elements[field_name].value;
    
       if (field_value == '' || field_value.length < field_size) {
         error_message = error_message + "* " + message + "\n";
         error = true;
       }
     }
    }
    
    
    
    function check_radio(field_name, message) {
     var isChecked = false;
    
     if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
       var radio = form.elements[field_name];
    
       for (var i=0; i<radio.length; i++) {
         if (radio[i].checked == true) {
           isChecked = true;
           break;
         }
       }
    
       if (isChecked == false) {
         error_message = error_message + "* " + message + "\n";
         error = true;
       }
     }
    }
    
    function check_select(field_name, field_default, message) {
     if (form.elements[field_name] && (form.elements[field_name].type != "hidden")) {
       var field_value = form.elements[field_name].value;
    
       if (field_value == field_default) {
         error_message = error_message + "* " + message + "\n";
         error = true;
       }
     }
    }
    
    function check_password(field_name_1, field_name_2, field_size, message_1, message_2) {
     if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
       var password = form.elements[field_name_1].value;
       var confirmation = form.elements[field_name_2].value;
    
       if (password == '' || password.length < field_size) {
         error_message = error_message + "* " + message_1 + "\n";
         error = true;
       } else if (password != confirmation) {
         error_message = error_message + "* " + message_2 + "\n";
         error = true;
       }
     }
    }
    
    function check_password_new(field_name_1, field_name_2, field_name_3, field_size, message_1, message_2, message_3) {
     if (form.elements[field_name_1] && (form.elements[field_name_1].type != "hidden")) {
       var password_current = form.elements[field_name_1].value;
       var password_new = form.elements[field_name_2].value;
       var password_confirmation = form.elements[field_name_3].value;
    
       if (password_current == '' || password_current.length < field_size) {
         error_message = error_message + "* " + message_1 + "\n";
         error = true;
       } else if (password_new == '' || password_new.length < field_size) {
         error_message = error_message + "* " + message_2 + "\n";
         error = true;
       } else if (password_new != password_confirmation) {
         error_message = error_message + "* " + message_3 + "\n";
         error = true;
       }
     }
    }
    
    function check_form(form_name) {
     if (submitted == true) {
       alert("<?php echo JS_ERROR_SUBMITTED; ?>");
       return false;
     }
    
     error = false;
     form = form_name;
     error_message = "<?php echo JS_ERROR; ?>";
    
    <?php if (ACCOUNT_GENDER == 'true') echo '  check_radio("gender", "' . ENTRY_GENDER_ERROR . '");' . "\n"; ?>
    
    <?php if ((int)ENTRY_FIRST_NAME_MIN_LENGTH > 0) { ?>
     check_input("firstname", <?php echo ENTRY_FIRST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_FIRST_NAME_ERROR; ?>");
    <?php } ?>
    <?php if ((int)ENTRY_LAST_NAME_MIN_LENGTH > 0) { ?>
     check_input("lastname", <?php echo ENTRY_LAST_NAME_MIN_LENGTH; ?>, "<?php echo ENTRY_LAST_NAME_ERROR; ?>");
    <?php } ?>
    
    <?php if (ACCOUNT_DOB == 'true' && (int)ENTRY_DOB_MIN_LENGTH != 0) echo '  check_input("dob", ' . ENTRY_DOB_MIN_LENGTH . ', "' . ENTRY_DATE_OF_BIRTH_ERROR . '");' . "\n"; ?>
    
    <?php if (ACCOUNT_COMPANY == 'true' && (int)ENTRY_COMPANY_MIN_LENGTH != 0) echo '  check_input("company", ' . ENTRY_COMPANY_MIN_LENGTH . ', "' . ENTRY_COMPANY_ERROR . '");' . "\n"; ?>
    
    <?php if ((int)ENTRY_EMAIL_ADDRESS_MIN_LENGTH > 0) { ?>
     check_input("email_address", <?php echo ENTRY_EMAIL_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_EMAIL_ADDRESS_ERROR; ?>");
    <?php } ?>
    <?php if ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0) { ?>
     check_input("street_address", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_STREET_ADDRESS_ERROR; ?>");
    <?php } ?>
    <?php if ((int)ENTRY_POSTCODE_MIN_LENGTH > 0) { ?>
     check_input("postcode", <?php echo ENTRY_POSTCODE_MIN_LENGTH; ?>, "<?php echo ENTRY_POST_CODE_ERROR; ?>");
    <?php } ?>
    <?php if ((int)ENTRY_CITY_MIN_LENGTH > 0) { ?>
     check_input("city", <?php echo ENTRY_CITY_MIN_LENGTH; ?>, "<?php echo ENTRY_CITY_ERROR; ?>");
    <?php } ?>
    
    <?php if (ACCOUNT_STATE == 'true') echo '  if (!form.state.disabled && form.zone_id.value == "") check_input("state", ' . ENTRY_STATE_MIN_LENGTH . ', "' . ENTRY_STATE_ERROR . '")' . "\n" . '  else if (form.state.disabled) check_select("zone_id", "", "' . ENTRY_STATE_ERROR_SELECT . '");' . "\n"; ?>
    
     check_select("country", "", "<?php echo ENTRY_COUNTRY_ERROR; ?>");
    
    <?php if ((int)ENTRY_TELEPHONE_MIN_LENGTH > 0) { ?>
     check_input("telephone", <?php echo ENTRY_TELEPHONE_MIN_LENGTH; ?>, "<?php echo ENTRY_TELEPHONE_NUMBER_ERROR; ?>");
    <?php } ?>
    
    <?php if ((int)ENTRY_PASSWORD_MIN_LENGTH > 0) { ?>
     check_password("password", "confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_ERROR_NOT_MATCHING; ?>");
     check_password_new("password_current", "password_new", "password_confirmation", <?php echo ENTRY_PASSWORD_MIN_LENGTH; ?>, "<?php echo ENTRY_PASSWORD_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR; ?>", "<?php echo ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING; ?>");
    <?php } ?>
    
    // cutomers referral required begin
    <?php if ((int)ENTRY_STREET_ADDRESS_MIN_LENGTH > 0) { ?>
     check_input("customers_referral", <?php echo ENTRY_STREET_ADDRESS_MIN_LENGTH; ?>, "<?php echo ENTRY_CUSTOMERS_REFERRAL_ERROR; ?>");
    <?php } ?>
    // cutomers referral required end
    
     if (error == true) {
       alert(error_message);
       return false;
     } else {
       submitted = true;
       return true;
     }
    }
    //--></script>
    I do notice one thing in my source code that is of interest and might be a reason why its not being read:
    Code:
    <fieldset>
    <legend>Were You Referred to Us?</legend>
    <label class="inputLabel" for="customers_referral">Referral Source:</label>
    <input type="text" name="customers_referral" value="" size = "16" maxlength= "32" id="customers_referral" /><span class="alert">*</span><br class="clearBoth" />
    </fieldset>
    
    </fieldset>
    There are two </fieldset> tags, but theres only one in my jscript_form_check.php file. When I delete the one it still doesnt work.

    Here's a link to the create account page:
    https://www.studiostyles.net/studios...create_account
    Im not sure what else I can do. Should I just tell the bossman it cant be done?
    John L.
    MultiMedia Designer

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Create Required Referral Field

    The code you posted looks nothing like the code I posted so I am now lost ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. 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
  2. Making Company Field on Create Account Required
    By pioupioun in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 21 Oct 2010, 04:31 PM
  3. New Report on Referral Code required. Possible?
    By rgeorgiou in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 9 Nov 2007, 04:13 AM
  4. Make Referral Info Required
    By Toot4fun in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Oct 2007, 12:26 AM
  5. State Field Not Required During Registration but Required in Admin?
    By Stenrique in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 2 Jun 2007, 09:13 AM

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