Validation: I'm stuck

timrichardson 05 Sep, 2011
I have v4 RC2.
I have a form which submits to a URL, and that's working fine.
I can't get client validation working. Even simple basic validation.
In the form wizard (advanced) I have marked two fields as required. Another field is for entering email; on its validation tab I have selected "email". This should reject strings which are don't look like email (so I guess).

When I go back to Forms Manager and click on the name of the form, I get some more settings.
There is a tab JS Validation.
I have JS Validation enabled. The other settings are default.

What I expect is javascript validation when the form is submitted. But nothing is happening.

Going back to the advanced form wizard, I discovered an action under utilities called Auto JavaScript Validation. At this point I become very confused. Do I need this? It has a configuration option allowing me to specify fields names which are eligible for certain validation rules. However, these are all blank and don't seem to be affected by the validation settings I make to individual fields in the Preview tab of the form wizard.
timrichardson 05 Sep, 2011
The problem is a conflict with jquery, which I load on each page.
Now I have to work out how to solve that.
GreyHead 05 Sep, 2011
Hi timrichardson,

Hre's my standard jQery reply:

Your template (or some other component) is loading the jQuery JavaScript library. 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, and will always load it in no-conflict mode.

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