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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Userforms :: validation bug


Go to End
Reply


21 Posts   5782 Views

Avatar
Willr

Forum Moderator, 5513 Posts

30 September 2009 at 3:43pm

Note that this won't really be 'fixed' for 2.4 since its the plugins / modules which are conflicting. Event_Calendar just needs to be updated to use the same jquery file as userforms (since its in jsparty) and any custom script use the correct jquery wrapper.

Avatar
banal

Community Member, 901 Posts

17 December 2009 at 10:11pm

I got the same issue with SilverStripe 2.3.4 and Userforms 0.2 Branch. No Event Calendar module here...
Doesn't seem to be a module clash.. will investigate further.

Avatar
banal

Community Member, 901 Posts

17 December 2009 at 10:48pm

Got this resolved.
I'm including a copy of jQuery and Userforms includes jQuery from the jsparty directory, this results in two versions of jQuery being loaded, causing this issue.

I was able to solve this by subclassing UserDefinedForm and adding the following init method:

public function init(){
   parent::init();
   // clear userforms includes
   Requirements::clear(THIRDPARTY_DIR . '/jquery/jquery.js');
   Requirements::clear(THIRDPARTY_DIR . '/jquery/plugins/validate/jquery.validate.min.js');
   // add validate plugin again (important because of include order)
   Requirements::javascript(THIRDPARTY_DIR . '/jquery/plugins/validate/jquery.validate.min.js');
}

One could also just include the bundled jQuery instead of another copy.. but that way I'm sure I got the jQuery version I need in order for my scripts to work.

Avatar
joelg

Community Member, 129 Posts

11 January 2011 at 11:12pm

Hi

I had a similar issue with the new Uploadify module from Uncle Cheese.

My form validation was breaking because the uploadify_init.js document didn't have this line at the top:

jQuery.noConflict();

Joel

Avatar
zim

Community Member, 135 Posts

11 June 2011 at 10:50am

Hey people. I see this is an old post. but i am getting same problem with userforms. I am doing a lot of stuff with jquery and am using noconflict. i put my jquery document.ready function in top level page.ss.

and am getting the error as userforms fires its own jquery doc.ready function.

i could not see the easy solution to this in this thread. can anyone advise?

do i need to put userform jquery stuff in my page.ss doc.ready function?

Go to Top