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

Userform - hidden forms with $Title


Reply

11 Posts   2181 Views

Avatar
CHD

6 October 2010 at 4:30am Community Member, 218 Posts

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

Avatar
edi2lopez

11 October 2010 at 6:43am Community Member, 6 Posts

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

14 June 2011 at 4:31am (Last edited: 14 June 2011 4:32am), Community Member, 218 Posts

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!