Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

User Forms 0.2 Javascript Validation not working


Go to End


1796 Views

Avatar
Viv

Community Member, 30 Posts

27 June 2009 at 2:50pm

Edited: 27/06/2009 2:53pm

Firstly, thanks to all those putting the hard work into the User Defined Forms section of the CMS - great work!

One problem I am having is that the javascript validation does not seem to be working at all when the form is submitted. Server side validation seems to work though, although I haven't tested it thoroughly.

The js error that appears on form submission (using Error Console in Firefox) is:

Error: $(this).rules is not a function
Source file: http://www.mysite.co.nz/jsparty/jquery/plugins/validate/jquery.validate.min.js?m=1245637447
Line: 15

I understand that the newer javascript is using more JQuery now using some of the files as below:

<script .../jsparty/jquery/jquery.js?m=1245636882"></script>
<script .../jsparty/jquery/plugins/validate/jquery.validate.min.js?m=1245637447"></script>
<script .../jsparty/prototype.js?m=1245637625"></script>
<script .../jsparty/behaviour.js?m=1245636772"></script>
<script .../sapphire/javascript/ImageFormAction.js?m=1245638693"></script>

This is compared with the javascript files used on my custom form (that is currently working without errors):

<script .../jsparty/prototype.js?m=1245637625"></script>
<script .../jsparty/behaviour.js?m=1245636772"></script>
<script .../jsparty/prototype_improvements.js?m=1245637632"></script>
<script .../sapphire/javascript/i18n.js?m=1245638693"></script>
<script .../sapphire/javascript/lang/en_US.js?m=1245638695"></script>
<script .../sapphire/javascript/Validator.js?m=1245638707"></script>
<script .../sapphire/javascript/ImageFormAction.js?m=1245638693"></script>

I am using: the stable 2.3.2 version of SS and the userforms-trunk-r80052.tar

Wasn't sure if it just something I'm missing or is a real bug. Any help would be appreciated.