Forums

No validation (not working)

picht 21 May, 2012
Hi

Now i have another site, where i need a form, but the validation is not working.

The site is http://spejder5kamp.dk/test_v2
Use the menu-item "xx" to the right. There are 2 submenus Test1 and Test2.
One has a chronoform directly "in the menu" and the other uses a article and the plug-in.
Neither is working. The two fields are both mandatory, but you can submit the form even if they are empty.
Both on IE and Chrome.

Please help...🙂

Regards
Picht
GreyHead 21 May, 2012
Hi Picht,

I count three different versions of JQuery loading on the form page. You need to get rid of two of them and get the remaining one into noConflict mode.

Bob
picht 21 May, 2012
Hi

Thanks for taking the time to help me.

I think i got rid of one of them, disabling jQuery in K2.
But how do i find the other one ? Is there a tool i can use ?
And how do i get the remaining into noConflict mode ?

Regards
Picht
GreyHead 21 May, 2012
Hi Picht,

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 - which may or may not work - 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 plugin named JB Library from Joomla! Bamboo and another named InterExt from AcuIT that allow you to control on which pages jQuery is loaded, and will always load it in no-conflict mode. However these requires that JQuery is loaded using the Joomla Document object methods. The InterExt extension allows you to select menu items to load JQuery.

I have a tutorial on Resolving jQuery problems that explores some of the issues an diagnostics and shows how to modify one template example to use the Joomla! Document methods to load JQuery in noConflict mode.

Bob
ajaxme 22 May, 2012
Solution:
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
</script>


Lavagem de estofado|Limpeza de carpete|Limpeza de tapetes|ajaxme
picht 13 Jun, 2012
That doesn't sound to easy, but i have installed the JB Library and have changed the setting "Enable Unique JQuery" to "Yes" and now it works. (Done on a copy of the site for testing)
there anything else I should change, or is there any other thing i should consider in this matter ?

Thanks for your replies 😀
GreyHead 15 Jun, 2012
Hi Picht,

Hard to say, jQuery problems depend on how the template/extension using jQuery are set up. Some are very simple to resolve, others very messy :=(

Bob
picht 15 Jun, 2012
And i thought Joomla was easy to use... :mrgreen:
GreyHead 15 Jun, 2012
Hi Picht,

Joomla! isn't bad at all. The problem is with the extensions and templates that make the decision to use JQuery without putting it into no conflict mode :-(

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