Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default Login - registration form validation problem

    Hello,

    The javascript validation forces the company field to contain at least two characters (strangely the alert box only shows a *, with no error message - but that's not the main issue).

    I don't want to force users to fill in the company field, it is not marked as required anyway.

    I have been looking through the files for a while but can't find where the code called in index.php?main_page=login is situated. I want to correct the code so that it does not generate an alert if the company field is empty.

    I'm looking through the form_check.js.php file but so far I'm under the impression I won't need to change any of the validation code, just the call to validation functions in the appropriate file.

    Thanks for any help,
    JM

  2. #2
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: Login - registration form validation problem

    More information:

    When I look through the form_check.js.php I don't see any validation code for the company field, but when I view source on the login page, I do

    { check_input("company", 2, ""); } // which by the way explains the lack of an error message.

    Still looking! Any help much appreciated.

  3. #3
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: Login - registration form validation problem

    Ah! Interestingly there is another form checker in the pages/login folder, jscript_form_check.php with this bit:

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

    I think I'm getting closer! I bet you the answer is very simple and a click away in admin...

  4. #4
    Join Date
    Feb 2006
    Posts
    41
    Plugin Contributions
    0

    Default Re: Login - registration form validation problem

    Yes! Silly problem solved in admin: configuration -> minimum values.

    I hope this was entertaining :)

  5. #5
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Login - registration form validation problem

    Thanks for explaining the hows and whys you had the error. It may help someone else. :)
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

 

 

Similar Threads

  1. Registration Form Validation Problem
    By vb023 in forum General Questions
    Replies: 1
    Last Post: 29 Jan 2013, 02:42 PM
  2. Registration Form Validation Problem
    By agent_44 in forum General Questions
    Replies: 8
    Last Post: 4 Oct 2009, 03:26 PM
  3. Login/Registration Problem
    By JustJo in forum General Questions
    Replies: 1
    Last Post: 26 Nov 2006, 06:10 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