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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Custom CMS


Go to End


2 Posts   984 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, 545 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