WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Add non case sensitive password protection (1 post)

  1. igor123
    Member
    Posted 1 year ago #

    Hello everyone,

    I have a question:
    I would like to have one password field that is checking only one pre-chosen password.
    So if the password is correct it should send the form out.
    And the password should not be case sensitive (e.g. wordpress and WordPress should work).

    At the moment I'm using your code that's only case sensitive:

    [ Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your code may now have been permanently damaged/corrupted by the forum's parser. Or use pastebin.com instead. ]

    <script type="text/javascript" language="JavaScript">
    <!--
    //--------------------------------
    // This code compares two fields in a form and submit it
    // if they're the same, or not if they're different.
    //--------------------------------
    function checkPassword(theForm) {
        if (theForm.password1.value != theForm.password2.value)
        {
            alert('The password is not correct.');
            return false;
        }
    else {
            return true;
        }
    }
    //-->
    </script>

    At the moment it just checks to fields if they are the same.
    I made the second field invisible with css and gave it a value with the password that should be the same.
    I know it is abslotely not save and you can read out the password in the sourcecode but I don't know a better solution that works with Contact Form 7.

    So does someone know how to add a password field in contact form 7 that is just checking a password that I'm pre-setting. It's the same password for everyone.
    Only if the password is correct the contact form should send the message out.

    Would appreciate any help.
    Thanks a lot

    http://wordpress.org/extend/plugins/contact-form-7/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.