3066 Posts in 866 Topics by 648 members
|Go to End|
7 October 2010 at 5:28am Last edited: 7 October 2010 5:36am
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');
11 October 2010 at 11:40pm
Not sure I've understood this correctly Phil - can you post your code for function getCMSFields() ?
11 October 2010 at 11:43pm Last edited: 12 October 2010 1:24am
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');
12 October 2010 at 1:20am
Oh ok. Thanks for the info swaiba. I'm a bit of a SS newbie.
12 October 2010 at 1:24am
No worries, I'm just interested in an answer here also!
4 June 2011 at 1:10am
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)
8 June 2011 at 11:09pm
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
|Go to Top|