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.

Form Questions /

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

Dynamic label tag


Go to End


2 Posts   2054 Views

Avatar
Mo

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.

Cheers,

Mo

Avatar
biapar

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>
$dataFieldByName(Surname)
***

Is there a function that return field $Title?