[SOLVED] Validation and tooltips issue (mootools?)

Phil91 27 May, 2009
This message is probably for Max:

Hi,

After fixing some email server issues I had, I now have a working registration Chronoform which you can see here:
http://sd-17661.dedibox.fr/cc2/index.php/preinscr

I do however have a couple issues which I don't really understand other than by assuming I may have a wrong version of mootols lib installed:

- The tooltips do not display tips, which is bad considering their usage (-:
- Validation does not seem to work: I added a tooltip to those 4 fields which are required. Used the Validate checkbox and specified all fields in the form wizard as well as in the validation tab...

So my questions are in absolute disorder:

- Is my mootools library invalid?
- Is there another way to validate the form other than by using embedded JS or PHP?
- Do I need to add Server validation code?
- If no other way, can anyone provide me some sort of a validation template, since I can maybe do something in javascript but php is not exactly my cup of tea....
- Am I making any other mistake elsewhere? Looked at the source code of the form and the "required" classes are there...

No comprendo....(-:

Thanks and best regards from Paris

Philippe
Phil91 27 May, 2009
Investigated a bit more on this and found what follows: as I suspected it, I seem to have a problem with mootools version...Ran the error console in FF 3 and found the error messages attached to this post (sorry, part of it is in french....) The first message seems to be a css related issue but don't know where to look for it...Seems to be in the form code itself..

The second error message is more interesting....

Can you tell me where and how to get the proper mootools library?

Thx

Philippe[attachment=0]mootools.jpg[/attachment]
GreyHead 27 May, 2009
Hi Phillippe,

The Mootools library looks fine - but you also have two different versions of JQuery loading and that will cause you problems alongside MooTools.

Bob
Phil91 27 May, 2009
Hi Bob,

Thanks for the info, but what can I do about this? Any hint?
Probably multiple components loading JQuery....

Thx

Philippe
Phil91 27 May, 2009
OK, got rid of one of the two occurences of JQuery, apparently without visible harm, but still no changes as far as the form and the tooltips...

Sigh....Too bad...Getting so close...

Philippe
GreyHead 27 May, 2009
Hi Phillippe,

You'l probably need to get rid of both copies of JQuery :-(

Test by adding &tmpl=component to the form url and checking it without the template.

I think it's possible to get tune JQuery so that it doesn't use the $('xxx') syntax and will co-exist with MooTools - but I'm afraid I don't know how

Bob
Phil91 27 May, 2009
Hi Bob,

You're 1000% right!! It does work that way...The only very serious drawback is that the other portion which uses JQuery seems to be my main menu at left (GlossyAccordion menu) and this is the ONLY one menu I found which could nicely handle the 50 different menus/submenus I got to manage....

Do you think that any php/js guru out there could help me out fine tune JQuery so that I could still use this wonderful combination?

Thanks

Philippe
GreyHead 28 May, 2009
Hi Philippe,

There's a joomla.org thread with some useful suggestions here

Bob
Phil91 28 May, 2009
Hey Bob,

Thanks for the heads-up...

Meanwhile I did fix it and I think I may just tell you what happens so that some other folks using this very very nice combination may not have to suffer like I did...

Turns out that, as you suspected, JQuery is involved in the conflict. Problem is, the "glossyaccordion" mod and plugin have been just developed as a wrapper around what's called ddaccordion.js created originally by folks at Dynamic Drive.

I googled ddaccordion confict and found a post from the Dynamic Drive folks who indicated that following a conflict with LightBox, they suggested to edit the ddaccordion.js file and replace all the defaut occurrences of the $ sign with anything else such as $j for instance...

Looking at the js code, I figured that the default variable they use to instantiate an JQuery object was just simply

var $ = jQuery
which is somewhat scary, given the environment...

So the fix is as follows:
- Locate the ddaccordion.js file inside the GlossyAccordion package,
- Do a Search and Replace of all "$" occurrences with "$j" (as an example)
- Comment out the 3 lines with var $j=jQuery at the beginning of 3 functions
- Put the following var declaration at the top of the file: var $j = jQuery.noConflict();

And this is it...Thanks to all the folks who fell into this and could help out...

When, just like me, you have to deal with a large number of menuitems and submenus, this GlossyAccordion mod/plugin combo proves to be the best pick..

Thanks for your invaluable help and which this exceptional forms package...

Philippe
GreyHead 29 May, 2009
Hi Philippe,

Excellent useful post, thank you. Hopefully this will help other susers with similar problems.

Bob
Phil91 29 May, 2009
My pleasure...
Chronoforms is such a neat package that it's great to use it and it's good to be able to help whenever possible...

BTW and before I mess it up all over again 😀: any way to change the font size in forms? A particular CSS file to recommend?

Philippe
GreyHead 30 May, 2009
Hi Philippe,

Get FireBug with FireFox to see what CSS is active. If it's the ChronoForms css then it's either in the css folder or the themes folder.

Bob
Phil91 30 May, 2009
Hi Bob,

Found it right after submitting the post...Shouldn't be so fast to ask questions and search first. It in fact is in the theme css...

Thx for your invaluable help as always....As a matter of fact, I just posted a VERY positive review for you guys on joomla.org...

Have a good one

Philippe
GreyHead 31 May, 2009
Hi Philippe,

Thank you

Bob
thapriest 15 Jul, 2009
Thank you for this usefull tip , i was breaking my head over this issue.
I too used te accordion menu for its great capabilities, and wanted to use chronoform as well as it is a great formmaker.

this solution made me happy again :mrgreen:
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger