Hi,
I have two fields in my form, one for email address (called email) and one to confirm the email (called email_confirm).
I'm trying to live validate that they are the same, so I've put this into the 'Form Javascript', but it seems not to be working - have I done it wrong? Put it in the wrong place? Or is the validation wrong?
Help would be much appreciated🙂
Thanks,
Matt
I have two fields in my form, one for email address (called email) and one to confirm the email (called email_confirm).
I'm trying to live validate that they are the same, so I've put this into the 'Form Javascript', but it seems not to be working - have I done it wrong? Put it in the wrong place? Or is the validation wrong?
Validate.Confirmation( 'email_confirm', { match: 'email', failureMessage: "Your Email confirmation does not match your Email." } );
Help would be much appreciated🙂
Thanks,
Matt
Hi Matt,
I think you need
LiveValidations set up by ChronoForms later.
Bob
I think you need
var email_confirm_lv = new LiveValidation('email_confirm', {
validMessage: "I am valid!"
});
email_confirm_lv.add(Validate.Confirmation, {
match: 'email',
failureMessage: "Your Email confirmation does not match your Email."
});
The _lv suffix is just to distinguish this from anyLiveValidations set up by ChronoForms later.
Bob
Hi,
I would like to do this also with one of my forms. It helps eliminate typos.🙂
I'm using ChronoForms v3.1 RC 5.5 with Joomla 1.5.
I was wondering if you could say into which file this code should be inserted, and roughly where it should be placed?
Thank you! Have a great day!!
Best Regards,
Jonathan
I would like to do this also with one of my forms. It helps eliminate typos.🙂
I'm using ChronoForms v3.1 RC 5.5 with Joomla 1.5.
I was wondering if you could say into which file this code should be inserted, and roughly where it should be placed?
Thank you! Have a great day!!
Best Regards,
Jonathan
Hi Jonathan,
It goes in the Form JavaScript box on the Form Code tab. To avoid timing erros on load I'd put it into a 'domready' function
Bob
It goes in the Form JavaScript box on the Form Code tab. To avoid timing erros on load I'd put it into a 'domready' function
window.addEvent('domready', function() {
var email_confirm_lv = new LiveValidation('email_confirm', {
validMessage: "I am valid!"
});
email_confirm_lv.add(Validate.Confirmation, {
match: 'email',
failureMessage: "Your Email confirmation does not match your Email."
});
});
Bob
I'm sorry I must be doing something wrong, or there is another setting I need to enable. I can't seem to get it to work.😟
I entered all info as instructed and edited my form field names to match.
Does Live Validation need to be enabled in the Validation Tab?
Is there a way to accomplish this through Server Side Validation?
Thanks!
I entered all info as instructed and edited my form field names to match.
Does Live Validation need to be enabled in the Validation Tab?
Is there a way to accomplish this through Server Side Validation?
Thanks!
Hi ClearSky,
Yes, the LiveValidation code needs to be loaded.
Yes but it's not quite the same to do it serverside.
Bob
Yes, the LiveValidation code needs to be loaded.
Yes but it's not quite the same to do it serverside.
Bob
Thanks GreyHead,
I got it to work now.
There is a block at the bottom of the LiveValidation window that says "13-validate-confirm" if you enter the field names of the two fields you want to match in this block the confirmation works. ie: email=confirm_email
Thanks again, and have a great day!!
Best Regards,
Jonathan
I got it to work now.
There is a block at the bottom of the LiveValidation window that says "13-validate-confirm" if you enter the field names of the two fields you want to match in this block the confirmation works. ie: email=confirm_email
Thanks again, and have a great day!!
Best Regards,
Jonathan
Hi There,
I am also in need of this feature and I have added 2 text box fields and given it the names txt_email and txt_email_confirm respectively. I then copied the domready function suggested above in to the JavaScript part under the Form Code Tab. I then enable live validation and added my 2 fields in box number 13 by entering the following: txt_email=txt_email_confirm.
but this is still not working. What do you think I am doing wrong?😟
EDIT: I found my mistake. I saw that I was entering the following in to box 13: txt_email=txt_confirm_email instead of txt_email=txt_email_confirm. My bad. This feature works very well!! Thank you. I don't see the point of the above function though cause the livevalidation works perfectly without it.
Plase help
Thanks
I am also in need of this feature and I have added 2 text box fields and given it the names txt_email and txt_email_confirm respectively. I then copied the domready function suggested above in to the JavaScript part under the Form Code Tab. I then enable live validation and added my 2 fields in box number 13 by entering the following: txt_email=txt_email_confirm.
but this is still not working. What do you think I am doing wrong?😟
EDIT: I found my mistake. I saw that I was entering the following in to box 13: txt_email=txt_confirm_email instead of txt_email=txt_email_confirm. My bad. This feature works very well!! Thank you. I don't see the point of the above function though cause the livevalidation works perfectly without it.
Plase help
Thanks
Hi Greyhead, Is there any way to do this without adding code? It would be great feature to add to Chronoforms since several other form solutions do already have this?
This topic is locked and no more replies can be posted.