I must be doing something wrong! I have basic password confirmation on, but it doesn't "stick" -- the confirm password field turns red briefly but then turns green, and lets the user put anything they want there.
I have validation turned on, mootools on, and I think I turned it off in the template (Purity) -- at least, I commented out these two lines from index.php:
<?php JHTML::_('behavior.mootools'); ?>
and
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.moomenu.js"></script>
I'm also trying to get a very basic LiveValidation match. I put this in the JavaScript area:
window.addEvent('domready', function() {
var membercode = new LiveValidation('membercode');
membercode.add( Validate.Confirmation, { match: 'testcode' } );
});
But it lets me type any old thing there too, and gives me the green border.
What am I doing wrong? I've been on the forums for the longest time trying to find a simple case like this.
My form is here: http://draft.masc.org/index.php?option=com_chronocontact&chronoformname=Registration
Help!
I have validation turned on, mootools on, and I think I turned it off in the template (Purity) -- at least, I commented out these two lines from index.php:
<?php JHTML::_('behavior.mootools'); ?>
and
<script language="javascript" type="text/javascript" src="<?php echo $tmpTools->templateurl(); ?>/js/ja.moomenu.js"></script>
I'm also trying to get a very basic LiveValidation match. I put this in the JavaScript area:
window.addEvent('domready', function() {
var membercode = new LiveValidation('membercode');
membercode.add( Validate.Confirmation, { match: 'testcode' } );
});
But it lets me type any old thing there too, and gives me the green border.
What am I doing wrong? I've been on the forums for the longest time trying to find a simple case like this.
My form is here: http://draft.masc.org/index.php?option=com_chronocontact&chronoformname=Registration
Help!
Hi gtownwebdev,
I just checked in FireFox & IE8 and the validation seems to be OK.
The border colors are a bit quirky but basically if the two fields don't match then you can't submit the form.
There do seem to be two copies of the confirmation validation in the page though one that ChronoForms has added and one that you have added, I think a little cleaning up is called for.
Bob
I just checked in FireFox & IE8 and the validation seems to be OK.
The border colors are a bit quirky but basically if the two fields don't match then you can't submit the form.
There do seem to be two copies of the confirmation validation in the page though one that ChronoForms has added and one that you have added, I think a little cleaning up is called for.
Bob
Thanks Bob. You're right about the password although I wish it wouldn't turn green at all if it doesn't match.
Now the member code. I just want a simple, straightforward IF what they enter for member code matches my phrase (let's say "testcode"), it validates.
I can do it with server-side validation but it's not very user-friendly that it green-lights any old thing they type, and then spits it back after they submit. Can't it be done with LiveValidation? I thought this would do it:
window.addEvent('domready', function() {
var membercode = new LiveValidation('membercode');
membercode.add( Validate.Confirmation, { match: 'testcode' } );
});
But it's not working. Maybe because "Validate.Confirmation" is only for matching two fields, not one field against a set phrase? Or maybe my syntax is wrong?
You can try it -- sign up with any old thing in the Member Code field instead of "testcode" and it'll let you right in. I turned off the server-side validation that I had as an additional check.
??
Now the member code. I just want a simple, straightforward IF what they enter for member code matches my phrase (let's say "testcode"), it validates.
I can do it with server-side validation but it's not very user-friendly that it green-lights any old thing they type, and then spits it back after they submit. Can't it be done with LiveValidation? I thought this would do it:
window.addEvent('domready', function() {
var membercode = new LiveValidation('membercode');
membercode.add( Validate.Confirmation, { match: 'testcode' } );
});
But it's not working. Maybe because "Validate.Confirmation" is only for matching two fields, not one field against a set phrase? Or maybe my syntax is wrong?
You can try it -- sign up with any old thing in the Member Code field instead of "testcode" and it'll let you right in. I turned off the server-side validation that I had as an additional check.
??
Hi gtownwebdev,
I think the green border kicks in when you enter something because the 'required' validation is met. You could change the css to turn it off.
The LiveValidation Confirmation might match if you make the codeword the value of a hidden input.
There's also a LiveValidation Inclusion that will check values agains ta list - presumably a list of 1 will work OK. From the LiveValidation docs:
Bob
I think the green border kicks in when you enter something because the 'required' validation is met. You could change the css to turn it off.
The LiveValidation Confirmation might match if you make the codeword the value of a hidden input.
There's also a LiveValidation Inclusion that will check values agains ta list - presumably a list of 1 will work OK. From the LiveValidation docs:
var f14 = new LiveValidation('f14');
f14.add( Validate.Inclusion, { within: [ 'cow' , 'pigeon', 'giraffe' ] } );
Bob
Wow, you're fast. I used the Inclusion routine you suggested and that worked perfectly, thanks!
This topic is locked and no more replies can be posted.