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

Javascript and UserForms inside other pages

Go to End

2 Posts   1657 Views


Community Member, 81 Posts

13 October 2010 at 8:35pm

Edited: 13/10/2010 8:37pm

Using a method similar to this I'm displaying my UserForm inside of a separate page.

It shows up and processes fine but the normal javascript requirements of jQuery and jQuery-validate aren't showing up and are instead being replaced with prototype.js, behaviour.js, and others.

Now I assume that the way I'm calling up the form bypasses UserDefinedForm->init(); and prevents it from applying the normal requirements. Including them manually is easy enough but what I haven't been able to figure out is where the other requirements are coming from.

Does anyone have any ideas on why this problem is happening and how it can be fixed?

The bits of code working with the form can be found here :
Edit : The page I'm working with is here


Community Member, 219 Posts

26 March 2011 at 3:30am

Edited: 26/03/2011 3:35am

you can block the usual prototype validators by adding this to your page.php in mysite/code/

public function init() {

// block prototype validation

// load the jquery
Requirements::javascript(SAPPHIRE_DIR .'/thirdparty/jquery/jquery.js');

that will make the userforms work normally in other pages when included.