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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Custom CMS


Reply


2 Posts   397 Views

Avatar
alana

Community Member, 7 Posts

25 February 2014 at 5:10am

Hi,

I want to customise the backend CMS, starting with a couple of simple changes. To for example this dataObject:

private static $db = array(
'SpeventID' => 'Int',
'Name' => 'Varchar',
'Description' => 'Text',
'Description' => 'Text',
);

As you can see the first field/column 'SpeventID' is not very user-friendly. Is it possible to add a custom label without having to change the column value?

Also if I have a 'date' data type in my database I want to provide a clickable calendar rather than expecting the user to input a string in a particular format. Similarly I'd like to provide a file select box for certain fields, if for example the field is a file name?

Is any of this possible?

Thanks,

Alan.

Avatar
zenmonkey

Community Member, 532 Posts

25 February 2014 at 1:47pm

CMS feild names only default to the column name if no title is given. You can specify the title when you create the field in you getCMSFeids function. The "Extending a basic site" tutorial covers this quite well http://doc.silverstripe.org/framework/en/tutorials/2-extending-a-basic-site

The tutorial covers how to handle file and date fields as well