17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1823 Views |
-
CMS Field titles not showing up. --TextareaField--

3 May 2008 at 7:54pm
Have a look at the attached picture, The field names won't appear for the two TextareaField's that I'm trying to create in the 'Place' tab, my Page.php code is below.
class Page extends SiteTree {
static $db = array(
'HorizontalSpace' => 'HTMLText',
'VerticalSpace' => 'HTMLText'
);
static $has_one = array(
);function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Place', new TextareaField('VerticalSpace'), 'Content');
$fields->addFieldToTab('Root.Content.Place', new TextareaField('HorizontalSpace'), 'Content');
return $fields;
}}
any suggestions? the titles appear when I use TextField
-
Re: CMS Field titles not showing up. --TextareaField--

3 May 2008 at 8:00pm
I get a positive result using TextField, picture attached
-
Re: CMS Field titles not showing up. --TextareaField--

4 May 2008 at 12:57am
This is an inconsistency with the API for TextareaField, as opposed to TextField.
$fields->addFieldToTab('Root.Content.Place', new TextareaField('VerticalSpace', 'VerticalSpace'), 'Content');
That should get you the label, just pass in the second argument.
Sean
| 1823 Views | ||
|
Page:
1
|
Go to Top |


