I have searched the forums and found a few threads on this but it looks like there are still no clear answers or solutions and it's still very confusing .
I need to compare two password fields to make sure they match each other.
Has it been determined what is the best way to do this. I am using Chronoforms in place of Joomla registration and have it all working except for this.
I have found these threads which make no sense to me as there are so many variations of the code people are trying to use:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10407&p=10488&hilit=compare+value
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10863&p=12141&hilit=password
Thank you.
I need to compare two password fields to make sure they match each other.
Has it been determined what is the best way to do this. I am using Chronoforms in place of Joomla registration and have it all working except for this.
I have found these threads which make no sense to me as there are so many variations of the code people are trying to use:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10407&p=10488&hilit=compare+value
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10863&p=12141&hilit=password
Thank you.
Hi brewster,
have you tried the JS hack in the first link you added ?
you can try this code at the server side validation box too :
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=10553&start=45#p14202
change don't to do not please
have you tried the JS hack in the first link you added ?
you can try this code at the server side validation box too :
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=5&t=10553&start=45#p14202
change don't to do not please
When you say the JS hack do you mean the mootools file alteration? I cannot tell by looking at the forum what has worked and what has not for people so it's like trying to get a needle from a haystack as there are several posts with slightly different versions of the same code.
I tried the PHP code you posted but got an error:
I am putting the code where it says:
I should add that I am using Joomla 1.0.15 so I am not sure this method will work.
I tried the PHP code you posted but got an error:
Fatal error: Class 'JRequest' not found in /home/unidesk/public_html/components/com_chronocontact/chronocontact.php(401) : eval()'d code on line 3I am putting the code where it says:
On Submit code - before sending email:
(may contain valid PHP code in PHP tagsI should add that I am using Joomla 1.0.15 so I am not sure this method will work.
I see, the PHP code is for Chronoforms J1.5 V3.0, your only hope now is the JS one at the first link, please follow posts from this one :
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10407&st=0&sk=t&sd=a&hilit=compare+value#p10410
tell the user confirms it works!
let me know!
Cheers
Max
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=10407&st=0&sk=t&sd=a&hilit=compare+value#p10410
tell the user confirms it works!
let me know!
Cheers
Max
or why don't you omit Chronoforms validation and use a simple JS alert box and it will work perfectly and easier to do ?
or why don't you omit Chronoforms validation and use a simple JS alert box and it will work perfectly and easier to do ?
yes I could just like the default joomla does but it kind of would be nice to use mootools. Maybe you could build field comparing in to the next version of CForms.
I got this to work, crude but functional:
and then putting this in form tag attachment:
function checkForm(form)
{
if(form.password.value != form.password2.value) {
alert("Your passwords must match in both fields");
return false;
}
else
return true;
}and then putting this in form tag attachment:
onSubmit="return checkForm(this)"
Great, at the next version I will try to add this but I'm planning to add a plain alert box validation too because at some cases the current one breaks the layout or moves fields.
Cheers
Max
Cheers
Max
This topic is locked and no more replies can be posted.
