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

TextareaField with 100% width


Go to End


3 Posts   2582 Views

Avatar
cybesun

Community Member, 9 Posts

22 March 2014 at 9:41pm

Hi All,

I've a DataObject which has a field "welcomeMessage" of type "Text".

Now in the CMS you see a text-area field, but I'd like to have 100% width ( like the HTML editor ).

It doesn't work if I increase the columns field on TextareaField.

Avatar
Devlin

Community Member, 344 Posts

25 March 2014 at 4:07am

TextareaField::create('test')
	// move label above the field
	->addExtraClass('stacked')
	// overwrite max-width from screen.css
	->setAttribute('style', 'max-width:100%')

Avatar
cybesun

Community Member, 9 Posts

25 March 2014 at 8:09am

Thanks a lot!