Hey Everyone,
I have the following code for the CMS Fields:
function getCMSFields() {
// Get the parent fields
$fields = parent::getCMSFields();
// Others removed
$fields->addFieldToTab("Root.Content.ArticleDetails", new CalendarDateField("Date", "Article date", date("d/m/Y")));
// Others removed
// return the fields
return $fields;
}
However, this is not setting the default value when I create a new item.
I have followed this thread: http://silverstripe.org/data-model-questions/show/266116?start=0 however I get an error when adding the $default variable to my class, just underneath the static $db = array() block.
Could someone please advise how to achieve this?
Cheers,
Justin