Validation isn't working [V4 RC2.0]

amanda1987 10 Dec, 2011
I'm probably doing something wrong, because my validation isn't working.

I have marked the fields as required (name, email and phone) and tried both enabling and disabling the JS validation.

Both ways after submitting, the form shows the thank you message and some error message above it ("Invalid address:"), but it sends the emails anyway.

You can take a look at the form here:
http://vdiparts.nl/site/index.php/en/parts/undercarriage-parts

update: In the events tab I've used 2 e-mail actions (1 for the sender and 1 for my admin).
When I don't fill in an emailadress it displays "Invalid address: You must provide at least one recipient email address."
When I do fill in an emailadress it displays no errors.
GreyHead 10 Dec, 2011
Hi amanda 1987,

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.

The Invalid address message is a Joomla! bug. Please see item 'm' in is bugs list

Bob
amanda1987 10 Dec, 2011
Thanks for your reply!

The use of jQuery in my template is the problem like you suggested.
(I temporarily disabled it in my template and the errors in the forms work perfectly).

Where excactly can I find "the ChronoForms Form JavaScript box:" to add the code to?
I've tried putting it in a "load js" event in the On load of my form, but that doesn't work.

I already use the jQuery operator, so just adding the line of code should fix it!?
GreyHead 11 Dec, 2011
Hi amanda1987,

In CFv4 it's the Load JS action you need.

I can't be sure that it will fix it. The noConflict instruction has to be executed after JQuery is loade and before any MooTools code is executed. When this happens is dependent on the way that the extensions using JQuery are written.

Bob
amanda1987 11 Dec, 2011
That didn't work, but I found another way.

I now use a plugin that loads jQuery. This plugin has a no-conflict-mode option.

Thanks for pointing out the problem!
GreyHead 14 Dec, 2011
Hi amanda1987,

If you have a jQuery plug-in working on Joomla! 1.6/1.7 please will you post a link. That will be very useful.

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