• Resolved Johann ROCHE

    (@johannroche)


    Hi,

    I’m using your plugin in version free for register clients.

    Some time, my clients (old generation) create 2 accounts by mistake (with 2 different emails). I would like to avoid this and do a custom validation based on :
    – Firstname
    – Lastname
    – Birthdate

    If the custom validation find a similar account with an other email, there is a message say “You are already registered with this email [email protected]”, are you sure to create an new account ?”

    How can i do this with your plugin ?

    Thanks

    • This topic was modified 1 year, 7 months ago by Johann ROCHE.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Georgian Cocora

    (@raster02)

    Hello @johannroche,

    You can add custom validation through custom code in order to achieve this. We can’t help you with this request, but I can give you some pointers.

    There is a documentation page here which explains how to add custom validation to a custom field: https://www.cozmoslabs.com/docs/profile-builder-2/developers-knowledge-base/custom-fields/add-extra-validation-to-a-custom-field/

    The birthdate field you mention falls in this category. For First and Last Name, it works similarly, we just don’t have the information about the field type you need to use on this page.

    For First Name, the filter to add custom validation is this: wppb_output_form_field_default-first-name and for Last Name, it’s this one: wppb_output_form_field_default-last-name. Everything else works exactly like it’s explained on that page.

    Hope this helps!

    Best Regards.

    Thread Starter Johann ROCHE

    (@johannroche)

    Thanks for your answer.

    In this case it’s not just for a custom field, but i need to check if the combination of different fields exist in the database.

    So i suppose that for this i need to use a hook just before the submit, no ?

    Because individually i can’t check the combination of all the field ?

    Thanks

    • This reply was modified 1 year, 6 months ago by Johann ROCHE.
    Plugin Author Georgian Cocora

    (@raster02)

    Hello @johannroche,

    Apologies for the late reply. You can use the same filter, entered values for other fields can be found in the $request_data array, this is basically containing all the data from $_POST that the form submits.

    Regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prevent duplicate account (not just based on email)’ is closed to new replies.