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

UserDefinedForm date picker on every page

Go to End

3 Posts   1948 Views


Community Member, 219 Posts

30 November 2010 at 3:06pm


i have one user defined form which is on a hidden page called "form-2"
then in my page.php i have a function that calls that form.
then on the main i have a control that makes makes the form appear on every page.

works great.

problem is, the date picker only works on the ACTUAL "form-2" URL page.
any idea why this is??

the only thing i can think of is a missing script not being called on the other pages?

thanks in advance.

P.S - you can see it working here:

and not working on any other page!


Community Member, 219 Posts

1 December 2010 at 12:47am

can anybody help with this??
it looks like the scripts loaded on the "form-2" page are different to all the other pages.
so im guessing the way im including the userdefinedform on every page doesnt work well with the datepicker.

im considering using an iframe at this rate! (what have i become)

any suggestions please??


Community Member, 219 Posts

1 December 2010 at 12:50am

Edited: 01/12/2010 12:51am

P.S - heres how im including the form at the moment:

   function ShowForm(){
      $get = DataObject::get_one('SiteTree', "URLSegment = 'form-2'");
      return new UserDefinedForm_Controller($get);


    <% control ShowForm %>
    <% end_control %>