Optional fields with js

M1c086 05 Mar, 2012
Hello,

I have a problem with a form with some variables fields. The form can be reached at this link http://www.bancamacerata.it/index.php?option=com_chronoforms&chronoform=form_torneo the problem is with the validation.
Depending on the value of some field I decide if show or not some other fields and I change the value of the attribute class (from validate['required'] to null), but when I press the submit button I have an error, like I have some empty field... Obviously all the changes in the form are via JS.

Can someone help me?

thanks

PS: joomla 1.7, chronoforms 4RC2
Max_admin 11 Mar, 2012
Hello,

I'm not sure how you set this up but you should enable/disable a field validation maybe ? enable using:

formCheck_FORM_NAME.register($('field_id'));


Disable:
formCheck_FORM_NAME.dispose($('field_id'));


Cheers,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.