Validate required fields only on submit

bladerunner 11 May, 2009
Hi,

When you enable form validation then when you leave the focus of a required empty field a message appears below the field to remind you that this is a required field. I would like to show this kind of messages only on submit because the form is ugly with al those messages when you skip roughly trough the fields.

Is there a hack to make it possible doing a required field validation on submit only?

Using: Joomla 1.0.15 and Chrono Forms 2.3.9

Thanks in advance.
Regards,
Jos
Max_admin 12 May, 2009
Hi Jos,

under components/com_chronocontact/chronocontact.html.php find:
immediate : true
change it to
immediate : false


this may work with your old version!

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
moriwenne 12 May, 2009
Hmm, hey Max, I too am experiencing this issue. I turned off validation while waiting to see if I could find a way around this. With a very long form having tons of messages breaks my css and well it annoys the user to have something popup just because you went by that box.

I am using RC5 though. I reckon the validation should only happen on submit?

Mori
Max_admin 12 May, 2009
Hi Mori,

Ok, for the new version lets wait for RC5.1 and I will add a switch for that!

Regards
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
moriwenne 12 May, 2009
Thanks Max

Don't neglect your kids over it though😉 Pace yourself

Mori
bladerunner 12 May, 2009

Hi Jos,

under components/com_chronocontact/chronocontact.html.php find:

immediate : true
change it to
immediate : false


this may work with your old version!

Cheers
Max



Max,
Pretty close. I had tried it before here but now I know why it didn't work. We have to change two files.

..\mambots\content\chronocontact.php

212 var valid = new Validation('<?php echo "ChronoContact_".$rows[0]->name; ?>', {immediate : true, onFormValidate : formCallback});
212 var valid = new Validation('<?php echo "ChronoContact_".$rows[0]->name; ?>', {immediate : false, onFormValidate : formCallback});

..\components\com_chronocontact\chronocontact.html.php

82 Identical to line 212 as above

Thanks anyway to point me to the right direction.

Regards,
Jos
This topic is locked and no more replies can be posted.