5095 Posts in 1518 Topics by 1114 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1167 Views |
-
problem with addfieldstotab in 2.3.3

20 October 2009 at 11:08pm
I have a Problem adding Fields to a existing Tab.
My Code ispublic function getCMSFields()
{
$f = parent::getCMSFields();
$f->addFieldsToTab("Root.Content.Right Box", new TextField('RightTitle','Right Title'), 'Content');
$f->addFieldsToTab("Root.Content.Right Box", new HtmlEditorField('RightColumn','Content'), 'Content');
return $f;
}I get two Tabs named Right Box. How can i add the new HtmlEditorField in the Right Box tab above?
I did it this way in SS 2.2 and it was working.
Am i blind?
-
Re: problem with addfieldstotab in 2.3.3

20 October 2009 at 11:11pm
OK helps talk about.
$f->addFieldsToTab("Root.Content.Right Box", new TextField('RightTitle','Right Title'), 'Content');
it must be "Root.Content.RightBox" instead...
-
Re: problem with addfieldstotab in 2.3.3

20 October 2009 at 11:59pm Last edited: 21 October 2009 12:00am
AFAIK there are two different functions to add Fields to a tab.
One is called addFieldToTab and expects parameters as you set them, the other one is addFieldsToTab and it expects an array of fields as the second parameter (and it ignores the third parameter).
| 1167 Views | ||
|
Page:
1
|
Go to Top |


