Call Moo Validation from template - SOLVED

datatonic 19 Nov, 2008
Hi there,

I have 2 chronoforms on one page and I am using moo-validation.

I would like to call moo-validation in my template rather than in the content, so that it is only loaded once on the page.

Is there a way I can do this?

Many thanks

Rowan
GreyHead 19 Nov, 2008
Hi datatonic,

I think you can turn off the CF code loading in the General Tab. If you do this then you'l need to look after the js and the css in your template.

Bob
datatonic 19 Nov, 2008
Hi there,

Never use the wizard, and that setting is turned off.

I have "use validation" on the validation tab set to on and the validation library set to mootools.

I am wondering where moo-validation.js is called from in the Chronoform Code. I would like to stop Chronoform from calling it and load it into my template, if possible instead.

As I have 2 forms on a page it is currently being called twice.

Many thanks

Rowan.
GreyHead 19 Nov, 2008
Hi datatonic,

It's loaded from chronocontact.html.php around line 30-40. But is conditional on LoadFiles being set to yes - see the image for the entry on the general Tab, It's much easier to turn this off for one of your forms.

Bob.
datatonic 19 Nov, 2008
Hi there, I did have the setting turned to off.

In the end I found the root of the problem, I am using the module, so I commented out the mooValidation calls in the helper.php file and now I can call it from the template.

Many thanks.

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