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

Userform - hidden forms with $Title


Go to End


11 Posts   4142 Views

Avatar
CHD

Community Member, 219 Posts

6 October 2010 at 4:30am

done it :)
return new HiddenField($this->Name, null, $this->CurrentPage()->Title);

Avatar
edi2lopez

Community Member, 6 Posts

11 October 2010 at 6:43am

Is there a way to make a custom field for $legend as well? I don't see a way to add <legend></legend> to the Userform template.

Avatar
CHD

Community Member, 219 Posts

14 June 2011 at 4:31am

Edited: 14/06/2011 4:32am

I've written a little tutorial on including data into forms, such as $member, $title etc:

http://www.clickheredigital.co.uk/blog/including-member-title-data-or-a-hidden-field-in-user-defined-forms-with-silverstripe/

hope it helps some in the future!

Go to Top