• Resolved zdravimte

    (@zdravimte)


    Hi all

    I’ve got two questions:
    1. Do you think an email retyping (together with some simple captcha, as suggested for this plugin) during the registration process is a sufficient as a spam protection? I mean to have a field “Your E-mail” and another field “Re-type your E-mail” and require their equiality.
    2.If so, how do i do it? I mean to require the equality of two main fields’ values.I am aware of the following hint in the Help: “To match the field to the value of another field, put the name of that field in the box.” But which box? Is it the “Validation” column (in the Main Fields tab), second box when the regex/match is selected? What would be the syntax.

    Thank you for any help.

    http://ww.wp.xz.cn/plugins/participants-database/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Roland Barker

    (@xnau)

    You select ‘regex/match’ as your validation mode on your second password field and then put the name of the first password field into the little box that shows up.

    Thread Starter zdravimte

    (@zdravimte)

    I have tried that already before but that does not work.
    What I’ve got is:

    #1– Name: email, Title: Email, Default: -, Group: Main, Form Element: Text-line, Validation: Email, Display column: 0, Admin Column: 4, CSV: on, Signup: on

    Then I set the following:
    #2– Name: imejlicek, Title: Retype Email, Default: -, Group: Main, Form Eelement: Text-line, Validation: regex/match and in the other field I put email (just as is), Display column: 0, Admin Column: 99, CSV: on, Signup: on
    see http://bandoneon.cz/files/screenshot1.jpg

    which after saving changes by itself to
    #2– … Validation: Email (without the other field containing the symbol email) …
    see http://bandoneon.cz/files/screenshot2.jpg
    So basically any two emails pass the test, no equality is checked.

    What am I doing wrong?

    Plugin Author Roland Barker

    (@xnau)

    You’re doing it right, it’s me that messed up.

    I’m going to have to give you a bug fix…the problem is, it sees the word ’email’ and instead of looking at the field named ’email’ it validates the input as an email. Wrong.

    So, two edits to the plugin files are needed. In the plugin file classes/FormValidation.class.php on line 335, you’ll find:

    case ( $field->validation == 'email' ) :

    change this to:

    case ( $field->validation == 'email-regex' ) :

    In the file participants-database.php on line 2078, you’ll find:

    __('Email','participants-database') => 'email',

    change this to:

    __('Email','participants-database') => 'email-regex',

    this will eliminate the confusion and the feature will work.

    You will need to re-set the validation values for both fields on the “manage database fields” page.

    Thread Starter zdravimte

    (@zdravimte)

    Great – that worked! [Just the line number to change in the participants-database.php was 2071 in my case, not 2078; but it was the only line with that syntax within the whole file anyway. 😉 ]

    Plugin Author Roland Barker

    (@xnau)

    Glad it worked…I must have had some extra lines in my copy of the file.

    And thanks for the bug report! Not sure how I missed it, but it’s fixed.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘retype email during registration’ is closed to new replies.