Forums

V4 validate field question

PJMFD 13 Jul, 2011
I am currently learning how to use v4 of Chronoforms and have a question!

As a test I have set validation on first text input field to required.
Then I have gone to Form Wizard - Actions and added Auto Server Side Validation to the On Submit panel.

Went in and added the field name that I set earlier into the "required" box and saved everything.

My problem is that I want to set an initial value in the field to say what the field is, rather than sticking a label on it. Obviously this then populates the field so the validation goes through without issue!

Is there a simple solution (I stress simple 😀 , as I am not a programmer!)

Here is the link to the test.
http://79.170.44.80/red-wasp.co.uk/index.php?option=com_content&view=article&id=18&Itemid=20

Many Thanks
Peter
GreyHead 13 Jul, 2011
Hi PJMFD,

I have a tutorial you can buy here about doing this with JavaScript. It uses JavaScript and requires some simple coding and therefore may not be for you.

Bob
PJMFD 14 Jul, 2011
Thanks Bob

I just might bite the bullet and buy that and give it go. Have to start somewhere!

One slightly unrelated question, I noticed when running this form in IE9 it forces IE to change to compatibility mode to view. Everything else IE8 and IE7 along with Chrome FF etc all work as planned. What could cause this?

Many thanks once again
Peter
GreyHead 14 Jul, 2011
Hi Peter,

I don't see any problem in IE9? No errors reported and running in IE9 mode?

Bob
PJMFD 14 Jul, 2011
Hi Bob

Thanks for taking a look.

Not sure why mine is doing it then.
I have been into IE9 menu and checked compatibility view settings, but it still switches to it when I load the page with the form.

Take the form off and the page loads normally without the message and switching to compatibility mode.

A bit more head scratching required!

Regards
Peter
PJMFD 15 Jul, 2011
Hi Bob
I now have an error message to do with the form!

Even though Firefox doesn't throw up an error, when I ran Firebug on the page I get the following error :

this.form.getProperty is not a function
[Break On This Error] var FormCheck=new Class({Implements:[O...t("validateFailure");return false}}});
formcheck-yui.js (line 1)

I am wondering whether this is causing the issue I am having with IE9?
Might be completely wrong though!

Thanks
Peter
GreyHead 16 Jul, 2011
Hi Peter,

I think this is because 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.

There is also a neat Joomla! system plugin named SC jQuery that allows you to control on which pages jQuery is loaded, and will always load it in no-conflict mode.

Bob
PJMFD 20 Jul, 2011
Hi Bob

I have finally got round to loading the SC jQuery plugin and that has got rid of the error message.
Thanks for that.

Still getting IE9 going to compatibility mode when loading page, so do I need to still look to put the javascript code you suggest into the Javascript box on Chronoforms?

If so, I need to look at this part as I am a bit out of my depth on this!!

you may need to update your own javascripts to use the longer jQuery operator.




Thanks for your help
Peter
GreyHead 20 Jul, 2011
Hi Peter,

You may not need to do anything. If there are problems with jQuery scripts please see their help docs here

Bob
PJMFD 20 Jul, 2011
Hi Bob
Once again many thanks for info.

I have been building another website and using Chronofroms V4.
This time I am loading the form using the plugin.
The validation works on everything except IE 9 ( but its not trying to force the browser into Compatibility mode!) the form is submitted regardless - so no validation going on.

After looking around the forum it seems that there is a bug with the plugin (V4 RC1.8)? If I load the form directly by using the "Frontend View" link in the forms manager it all works correctly in IE 9.

This got me thinking and so I went to the orginal website that this thread has been on about and unpublished the form that loads using the mod_chronoforms V4 RC1.8, and tried testing the form directly by using the "Frontend View" link in the forms manager.

All loaded ok without switching to Compatibility view!

Not sure whether there is a link or not, but thought I should raise it here.

Peter
GreyHead 31 Jul, 2011
Hi Peter,

Thanks for the update. There are clearly some bugs in the current versions of the Plug-in & Module. We have seen reports of:[list]
  • Problems with IE9

  • Problems with more than one form on the same page using the module or plugin

  • Problems with URLs in some cases

  • Problems with the module plug-in on the home page.
  • [/list]These may or may not be linked. The only fix I've seen is the one here.

    I'll add a link to this post in the CFv4 bugs list.

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