Forums

Validation is not working

claudem 10 May, 2012
Hi Validation is not working for me, not sure why, I built the form in wizard.

Here is the link:
http://ethne.net/ethne12/index.php?option=com_chronoforms&chronoform=Ethne_2012_Registration

and here is an example piece of code:

<div class="clear"></div><div id="error-message-share"></div></div><div class="ccms_form_element cfdiv_text" id="fname_container_div"><label for="fname">Full name</label><input id="fname" maxlength="200" size="30" class=" validate['required']" title="" type="text" value="" name="name" />
<div class="clear"></div><div id="error-message-name"></div></div>

Thank you
Claude
andypooz 11 May, 2012
Your form should have the class 'hasValidation', but it doesn't. I've been through the settings trying to figure out how you might have turned this off but I can't figure it out. Did you manually add the validation classes on your fields or were they done through the wizard? Try this caopy all your form code somewhere safe then choose 'wizard' as the type, and then go into the wizard edit mode and add/edit a field adding validation to it. Save and exit. Preview your form to see if the hasValidation class has been added to your <form class='Chronoform '>. If it has, great, go into the form properties (not wizard, switch the mode back to custom and paste in your original form code. If this doesn't work, try creating a new form with validation and then copying your form code across??
Max_admin 11 May, 2012
Hi,

Unfortunately you have the JQuery library loaded in your page, which conflicts with the Joomla core Mootools library (used by Chronoforms), here is the raw version of the form with the validation working fine:

http://ethne.net/ethne12/index.php?option=com_chronoforms&chronoform=Ethne_2012_Registration&tmpl=component

You will have to disable the JQuery or apply some fix to get it to work with mootools, here is how:
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

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

where do I disable JQuery?

Thank you Andy but I did all of it in Wizard.

Thank you
Claude
GreyHead 14 May, 2012
Hi Claude,

It depends on where and how JQuery is being loaded. Here's my standard jQuery reply:

Out of the box jQuery isn't compatible with the MooTools library used by Joomla! and ChronoForms. You can use jQuery with MooTools in no-conflict mode. There are various ways of doing this. The simplest - which may or may not work - is to add a line of script in the ChronoForms Form JavaScript box:
jQuery.noConflict();
This will free the $ operator which is used by MooTools, so you may need to update your own javascripts to use the longer jQuery operator.

There is also a neat plugin named JB Library from Joomla! Bamboo that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However this requires that JQuery is loaded using the Joomla Document object methods.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
claudem 14 May, 2012
Thank you all for your help. The template allowed me to disable JQuery just by clicking on it.
This topic is locked and no more replies can be posted.