This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:
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
2 Posts 1807 Views
15 September 2010 at 12:32am
In the ss book (when created a TableListField for displaying data) there is a line to cast Boolean data into 'Boolean->Nice' so that instead of Value (field name) and 0 or 1 (data) instead appears Value? and Yes or No.
Is there away to apply this to ModelAdmin please?
22 September 2010 at 9:27pm
found the answer...
static $casting = array(
"MyTextBoolean" => "Text"
public static $summary_fields = array (
public function MyTextBoolean()
$str = 'No';
if ($this->BooleanField== true)
$str = 'Yes';