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

UserForms - get form from control Children


Reply

2 Posts   939 Views

Avatar
patte

7 December 2010 at 3:35am (Last edited: 7 December 2010 3:37am), Community Member, 63 Posts

Hi,

I am trying to build a PageScroller collecting all children pages with <% control Children %>.

One of this pages is a UserForm page. I am able to get the $Content of every normal Page but unfortunately I do not know howto get the form from User itself.

ScrollerPage
-Page
-Page
-UserForm
-Page

Layout/ScrollerPage.ss

...
<% control Children %>
<div class="sectionElement">
   <div class="elementContent">
      $Content
      $Form
   </div>
</div>
<% end_control %>
...

How to get the form itself? Any idea?

patte;-)

Avatar
moloko_man

22 February 2011 at 11:52am Community Member, 72 Posts

You can't access functions in the Controller of the children pages.

This discussion talks about it and has a possible hack for getting it to work [url]http://www.silverstripe.org/template-questions/show/11730[/url]