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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

UserForms - get form from control Children


Go to End


2 Posts   1930 Views

Avatar
patte

Community Member, 63 Posts

7 December 2010 at 3:35am

Edited: 07/12/2010 3:37am

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

Community Member, 72 Posts

22 February 2011 at 11:52am

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 http://www.silverstripe.org/template-questions/show/11730