Skip Navigation

[Closed] Check that 2 email fields are the same

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 1 year, 2 months ago.

Author
Posts
#2640109

Hi,

I want to have 2 custom email fields so the user would be able to enter their email twice so I can verify they did not make a mistake and that both of those fields matches. How can I do this with the Toolset Forms plugin.

Thanks,

Tim

#2640177

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Tim

I would add a second, generic, email field for users to confirm their email address.

You can then either use JavaScript (or jQuery) for some client-side validation, or you could use the cred_form_validate hook for server-side validation after the form has submitted, though that's a less satisfactory experience for users.

It needs a little thought as to how best to apply the validation, probably when the second email field loses focus (hidden link).

Note with generic fields they are simply discarded after the form submission is completed, which is what you would want in this case anyway.

https://toolset.com/course-lesson/adding-generic-fields-to-forms/

The topic ‘[Closed] Check that 2 email fields are the same’ is closed to new replies.