Validation txt on entry into a new field without typing

SIJO 16 Apr, 2009
New to Joomla 5 days old and creating forms with this excellent componet .I'm using joomla 1.5.10 and the last download of chrono forms V3.1 RC3 .

I have created a form using the wizard, eg name, email, address etc, I have placed validation on the fields. Problem is that when I enter the name and tab onto the next field , email the validation text displays before you have a chance to enter any information. I'm I missing something, i thought that validation only kicks in after leaving the field not entering . Is their a way to fix this. I'm new to this and just getting my head around basic css. I looked through but could not see anything related.

Many thanks

Sijo
GreyHead 17 Apr, 2009
Hi Sijo,

The current ChronoForms release is RC4.11 and Max changed the validation library completely (it still has the same interface but is different behind the scenes). I suggest that you upgrade and see if the problem is still there.

I haven't seen the validation triggered onFocus before - maybe that's a glitch in one release?

Bob
SIJO 17 Apr, 2009
I am using RC4.11 which I believe is the latest release.
GreyHead 17 Apr, 2009
Hi siko,

Ok - your post said RC3. Looks like there may be a bug. I don't know my way round the new validation code yet, Max may be quicker to find out what's happening.

Bob
SIJO 17 Apr, 2009
Sorry about the confusion regarding the version, I would appreciate any help you can provide.

Thank you for your time.
GreyHead 17 Apr, 2009
Hi siko,

We've had two or three messages about validation problems with the new library. Max is much more familiar with this than I am and hopefully will be able to find the remaining bugs.

Bob
SIJO 20 Apr, 2009
Sorry to ask again but has Max had a chance to look into this problem as I need to put the site live before the end of the week. I appreciate your time and help on this matter.
Max_admin 21 Apr, 2009
Hi sijo,

I don't think this is a bug, it just tells the user what he/she should have, in the next release I will make a switch so it fires at the field enter or the submit event!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 21 Apr, 2009
Hi sijo,

The new validation works 'as you type', I guess this is a problem with an email which is motly invalid until it's complete.

Bob
SIJO 24 Apr, 2009
Oh, thanks for looking in the problem - as I am sure you may agree having a validation message as soon as you enter the field is not really the look we are aiming for. I have been impressed with your product but will obviously have to find an alternative.

Thanks Guys anyway for your time and effort.
GreyHead 24 Apr, 2009
Hi sijo,

Just in case you missed it Max did say that he would switch this to onSubmit or onChange in the next release. The LiveVlidation library is new to ChronoForms in RC 4.11 and there a still a few bugs to work out- if you check the LiveValidation site you will find exactly the same behaviour :-(

Bob
Max_admin 24 Apr, 2009
Hi Sijo, if you didn't already uninstalled Chronoforms then let me know and I will show you a quick fix!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
juanon 25 Apr, 2009
Hi admin,

I have read the whole post becasuse i have the same problem.

Can you tell me the fix, please??

thanks in advance and keep the good work
SIJO 27 Apr, 2009
Hi Max, no I have no uninstalled it as I do not really want to as I like the product. If you are able to show me the "quick fix" then that would be great.

Look forward to hearing from you.

Simon (sijo)
GreyHead 27 Apr, 2009
Hi Simon,

I think this is it: Open components/com_chronocontact/libraries/inlcudes/JSvalidation2.php and look for this on line 12:
eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ' });");
and add a new option
eval("var cfvalidate_"+field.getProperty('name').replace('[]', '')+" = new LiveValidation(field, { validMessage: ' ', onlyOnBlur: true });");
This switches the validations to the blur event when the input loses focus (you could also use onlyOnSubmit).

Bob

PS Although this is a php file it looks more like a javascript file and won't open in my usual editor unless I rename it as .js
SIJO 27 Apr, 2009
Thanks Bob, I will give it a try and let you know the outcome.
juanon 01 May, 2009
Hi,

First of all thanks a lot for the fix.

But it still don´t work with mandatory textareas, can i fix this some way?

Thanks a lot again
GreyHead 01 May, 2009
Hi juanon,

I think that if you look in the same file - but right near the end you will find two blocks of code, one for textareas and the other for select boxes. Make the same change in the textarea one.

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