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.

Customising the CMS /

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

Way to add a label to a field in a custom tab?


Go to End


2 Posts   990 Views

Avatar
rbTech

Community Member, 4 Posts

12 January 2012 at 6:30am

Hi folks
I've extended my page.ss to include a MenuImage field, and I'd like the tab to show a bit of descriptive text below the ImageField (e.g. "Please use a 100x100 image for best results").

I've googled and searched through the SilverStripe book but to no avail. Is there a way to add a label like that in SS?

Thanks very much,
Rubin

Avatar
Willr

Forum Moderator, 5523 Posts

14 January 2012 at 4:26pm

You can use the setRightTitle() function on a form field to set a secondary label. Or if that doesn't give you the control you need, insert a new LiteralField form object and include the HTML you need.