Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » UserDefinedForm date picker on every page

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1417 Views
  • CHD
    Avatar
    Community Member
    217 Posts

    UserDefinedForm date picker on every page Link to this post

    hi,

    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 page.ss 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:
    http://dev2.clickheredigital.co.uk/form-2

    and not working on any other page!

  • CHD
    Avatar
    Community Member
    217 Posts

    Re: UserDefinedForm date picker on every page Link to this post

    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??

  • CHD
    Avatar
    Community Member
    217 Posts

    Re: UserDefinedForm date picker on every page Link to this post

    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);
    }

    and

    <% control ShowForm %>
    $Form
    <% end_control %>

    1417 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.