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.

All other Modules /

Discuss all other Modules here.

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

UserDefinedForm date picker on every page


Reply


3 Posts   1541 Views

Avatar
CHD

Community Member, 218 Posts

30 November 2010 at 3:06pm

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!

Avatar
CHD

Community Member, 218 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??

Avatar
CHD

Community Member, 218 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);
}

and

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