Forums

Javascript Validation not working

rakatatech 10 Jul, 2013
Hi,

Got a problem with the default javascript validation.

We have a pretty simple for and the validation works fine if loaded as a test from the ChronoForms module.

However if we edit a record via the ChronoConnectivity list the form works fine but the javascript validation does not fire.

I've looked for jQuery conflicts / scripts not loading but struggling to see much of a difference is in what is being loaded between the 2 scenarios.

Using V4 on Joomla 3.1.1.

Any thoughts / help appreciated, Scott
GreyHead 10 Jul, 2013
Hi Steve,

It should work either way as fa as I know. Please post a link to the form so I can take a quick look.

Bob
GreyHead 10 Jul, 2013
Hi Scott,

I can't put my finger on the problem. It's something to do with the template. If you add &tmpl=component to the url you posted then the validation works. As far as I can see the same files are being loaded and no JavaScript errors show in FireFox or Chrome :-(

I didn't compare every line but I did notice that the template loads some jQuery tooltip code
jQuery(document).ready(function()
{
jQuery('.hasTooltip').tooltip({});
}); 
It's possible that is the problem?

Bob
rakatatech 10 Jul, 2013
Hi,

Did a little further looking - the post url on the form that works uses "event=submit" as a param - rather than "task=submit" on the one that doesn't work.

Do we need to tell ChronoConnectivity to trigger the submit event on the form to therefore trigger the validation? (or something like that)

cheers, Scott
GreyHead 11 Jul, 2013
Hi Scott,

I don't think it has anything to do directly with the URL, there is a JavaScript error triggered by some code in your template. See my last post - remove the template and the validation works.

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