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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Form Questions /

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

Dynamic label tag

Go to End

2 Posts   1672 Views


Community Member, 541 Posts

14 August 2009 at 4:57am

Hey all,

Quick question, if I have a custom form template, is there a way of generating a label tag, in a similar to generating the field using $dataFieldByName()?

I have browsed the Form class and cant see anything that matches this.




Forum Moderator, 435 Posts

26 January 2010 at 2:40am

This is a good question.
I need this info, too...

<label class="left" for="$FormName_Surname">Surname</label>

Is there a function that return field $Title?