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.
I have a problem with a HTMLText data type being displayed in a text field instead of a editable html field. The problem only occurs when the field is being displayed in a pop-up field.
Any ideas on what might be causing this issue? I've posted the code used to re-create the problem below.
class TestAdminTree extends ModelAdmin
static $managed_models = array('TreeParentObject');
static $url_segment = 'testtreeadmin';
static $menu_title = 'TestTree Admin';
class TreeParentObject extends DataObject
static $db = array('Name' => 'Text');
static $has_many = array('TreeChildObject' => 'TreeChildObject');
class TreeChildObject extends DataObject
static $db = array('HT' => 'HTMLText');
static $has_one = array('TreeParentObject' => 'TreeParentObject');
Not sure I've understood this correctly Phil - can you post your code for function getCMSFields() ?
FYI the field is automatically scaffolded into a HTMLField (as you can see if you add TreeChildObject to the managed models)... so there is no need to override the getCMSFields to reproduce this...
static $managed_models = array('TreeParentObject','TreeChildObject');
Oh ok. Thanks for the info swaiba. I'm a bit of a SS newbie.
No worries, I'm just interested in an answer here also!
I know CTF is going to die soon, but please can anyone help with a solution to using TinyMCE in a CTF has_one / has_many popup please?
(see attached image if there is any confusion)
are you using this within an ComplexTableField?
if so I think the best might be specify the popUpFiled types for the table field.
new ComplexTableField($this, $name, $sourceClass, $fieldList = null, $detailFormFields = new FieldSet( new TextField('HT'); ) )
this might work, and if you still need a WYSIWYG editor on the popup you can use some of the goodies which ships with the DataObjectManagerModule of unclecheese