Forums

validation doesn't work

karelmaes 05 Jan, 2012
Hi,

If I drop a textbox and enable its checkbox 'required', this doesn't work in the frontend.

So after I left the textbox blank, I just can press the submit button without getting any error message.
In chronoforms v3 this always worked fine with me.

This is the first time I use the new version of chronoforms so it could be I oversaw something.

here's the url :
http://grondwerkenvangheluwe.be.apache10.hostbasket.com/index.php?option=com_chronoforms&view=form&Itemid=471

Hope somebody can help me with this
GreyHead 06 Jan, 2012
Hi karelmaes ,

Your template (or some other component) is loading the jQuery JavaScript library (two different versions on this page). 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 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 Joomla! 1.5 system plugin named SC jQuery that allows you to control on which pages jQuery is loaded. The JB Library Plug-in looks as though it may do the same for Joomla! 1.6/1/7

Bob
karelmaes 06 Jan, 2012
Hi Bob,

Thx for your reply!
Sorry if I ask a stupid question, but how do I add a line of script in the ChronoForms Form JavaScript box?
GreyHead 06 Jan, 2012
Hi karelmaes,

Errr . . . You drag a Load JS action into the On Load event, click the spanner icon to open the configuration, then you type it in, or copy and paste it.

Bob
karelmaes 06 Jan, 2012

Hi karelmaes,

Errr . . . You drag a Load JS action into the On Load event, click the spanner icon to open the configuration, then you type it in, or copy and paste it.

Bob


I tried this yesterday and it still doesn't work.
I understand this method 'noConflict()' just tries not to conflict the jQuery library with the MooTools library?

Indeed, if I use another template, it works fine.
Strange because I only add another module position in the templates index.php file..
GreyHead 08 Jan, 2012
Hi karelmaes,

Yes the code just tries to put JQuery into noConflict mode so that it doesn't break MooTools. It has to run after the JQuery library has loaded and before any MooTools code is run. Getting it in the right place can be tricky.

It may be that the module code uses JQuery.

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