Menu

Required fields not being required

Help
W4Designs
2008-08-28
2013-06-03
  • W4Designs

    W4Designs - 2008-08-28

    here's a weird one. I ahve a form built with required fields and also CAPTCHA in place. With CAPTCHA code in tact, the form errors if you miss required fields, turns em pink and won't let you submit, even if you only complete captcha.

    I want to remove CAPTCHA. I removed the following 2 lines form the processor:

    session_start();
    if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {

    as well as:

    }
    else {
    echo "Invalid Captcha String.";
    }

    Then removed the CAPTCHA line item from the code of form.html. Now when I submit, I quickly see the incomplete required fields turn pink, but the form submits.

    BTW, the required fields have a 1 in them at the bottom of form.html like so:

    if (validateField('field_2','fieldBox_2','text',1) == false)
    retVal=false;

    Did I remove something that needed to be in place in the processor or is something else wrong?

    Thanks!

     
    • TNTEverett

      TNTEverett - 2008-08-28

      "Did I remove something that needed to be in place?"

      It doesn't work so the answer to that question is "yes".

      If you want to send me the original zip file I can help you by making this change.  Without seeing what you have done there is no way for me to help you fix it. 

       
    • W4Designs

      W4Designs - 2008-08-28

      Holy crap, I figured it out what I did wrong. It's amazing!

      However, in regards to required fields, what determines which one the form jumps to when it errors on required fields not being complete. In other words, my form has about 10 (out of 80 total) fields that are required. If I complete nothing and hit submit. It jsut to like the 8th one and starts blinking the cursor in that one. Should it not go to the last one it finds that's not complete that is required?

      Is there any variable that could be set or something to tell it to go to the first one it finds that's not complete rather than the last?

      Thanks!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.