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

Can't Display HtmlEditorField


Go to End


3 Posts   2061 Views

Avatar
_Vince

Community Member, 165 Posts

21 September 2009 at 12:40pm

Hi, I have an odd problem. Hopefully a simple one.

I have a popup where I have added a HtmlEditorField, it refers to a database column set to "HTMLText" but all I get in my popup is a simple textarea field. No WYSIWYG buttons or anything.

What am I doing wrong?

class Products extends DataObject {

static $db = array(
'Product_Name' => 'Text',
'Product_Blurb' => 'HTMLText'
.
.
.
function getCMSFields_forPopup() {

$fields = new FieldSet();
$fields->push( new TextField( 'Product_Name', 'Product Name'));
$fields->push( new HtmlEditorField("Product_Blurb", "Description"));
.
.
.

Any ideas?

Avatar
Juanitou

Community Member, 323 Posts

22 September 2009 at 3:10am

Hi!

It's a simple problem indeed: HtmlEditorField does not work in popups. I don't remember why or where did I found the info. I think that the DataObjectManager module implements a simple HTML field for popups.

Regards,
Juan

Avatar
_Vince

Community Member, 165 Posts

22 September 2009 at 5:03pm

Ah... ok, thank you. :P :D