21491 Posts in 5783 Topics by 2621 members
| Go to End | Next > | |
| Author | Topic: | 4657 Views |
-
Userforms :: validation bug

17 September 2009 at 1:45am
Hi all
Just set up a basic user form, nothing fancy. Set a couple of fields to be mandatory and I'm getting script errors on page load.
Firebug says:
$("#Form_Form").validate is not a function
and points to this line of code in the source:
, EditableDropdown19:{
required:1
}If I then make that field not mandatory and run the page again, Firebug says the same and points me at the source code for the previous formfield:
, EditableTextField18:{
maxlength:"1000"
}and so on.
Anyone seen this before or know what's happening?
jf/
-
Re: Userforms :: validation bug

17 September 2009 at 3:18am
Sounds like a javascript namespace issue. Are you including jQuery or some other framework that would interfere with the default Prototype use of $?
-
Re: Userforms :: validation bug

17 September 2009 at 7:45pm
@dalesaurus. No, I'm not specifically including anything special, I'm just using a standard SS installation, nothing fancy.
-
Re: Userforms :: validation bug

18 September 2009 at 4:06am
Hmmmm, can't troubleshoot without some more information. Can you post your form code and/or point to a live site to see the error?
-
Re: Userforms :: validation bug

18 September 2009 at 11:22pm
@dalesaurus. Okay, I've saved out the source code of the page in question, and it's attached.
I notice that the $("#Form_Form").validate() function appears to be included on the page twice. Is this normal?
Also, there is a call to a JQuery script just above those functions, but that's SS just doing what it normally does, no?jf/
-
Re: Userforms :: validation bug

19 September 2009 at 2:42am
Sorry I wasn't clear, I meant the PHP source code. Are you writing your own forms or is this from the UserForms module? I see that your date fields are not the standard 2.3.3 validated with Prototype/Behaviour. Are you using a beta version of SS?
SS Forms are pretty bang-bang out of the box, if you are having this much trouble something is wrong.
-
Re: Userforms :: validation bug

19 September 2009 at 10:55am
SS Forms are pretty bang-bang out of the box.. Quote of the day! Nice one dalesaurus
-
Re: Userforms :: validation bug

21 September 2009 at 8:03pm
@dalesaurus.
I'm using a standard installation of SilverStripe CMS - 2.3.3 and the form is generated by the UserForms module.
Which php files are you interested in looking at?
jf/
| 4657 Views | ||
| Go to Top | Next > |



