Sauter la navigation

[Fermé] Check that 2 email fields are the same

This support ticket is created Il y a 1 année et 8 mois. There's a good chance that you are reading advice that it now obsolete.

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.

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Nigel Il y a 1 année et 8 mois.

Auteur
Publications
#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

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01: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 (lien caché).

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/

Le sujet ‘[Fermé] Check that 2 email fields are the same’ est fermé à de nouvelles réponses.