Forums

How to add "Confirm your email" field..

hubert.dyba 15 Aug, 2009
hi there,
the question is as above. I need just a simple field to write again an email adress, and check if fields "Email" and "Confirm email" match before executing the form.
I'm sure it has to be easy, I was searching the forum, but I can't solve it on my own as I don't know php😀

thanks in advance!
Hubert
GreyHead 15 Aug, 2009
Hi hubert,

You can do this in server-side validation very easily. I think that Max also posted a JavaScript LiveValidation add-on in the forums here a month or two ago.

Bob
hubert.dyba 27 Aug, 2009
hi Bob
thanks for reply.
I've found something on livevalidation, but I am unable to use it - I have no idea where and how to put it to my code😟
I've found on this forum a code

if (JRequest::getString('email') != JRequest::getString('email2')) {
return "Unable to verify your email address. Please double-check your entry."
}

I understand that I have to create another field 'email2',
but I don't know, how to put this to my code?
nml375 27 Aug, 2009
Hi Hubert,
That piece of code is not related to livevalidation, but serverside-validation (ssv). You add that to the ssv box in the form setup, and enable ssv, and finally add a second input field to your form named 'email2'.

/Fredrik
This topic is locked and no more replies can be posted.