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

CheckboxField not set to checked in CMSFields


Reply


462 Views

Avatar
micahsheets

Community Member, 165 Posts

13 November 2012 at 10:20pm

Silverstripe 3

DataObject ScheduleEvent managed in ModelAdmin.

I have $db = array('AllDay" => "Boolean");

and $defaults = array("AllDay" => '1');

When I click new scheduleevent button I get the form for inputting the objects data. However even though it setting the value of the checkbox to 1 it does not set checked param to "checked" This means that on a new object create form the checkbox does not look like it is checked when it should.

How are defaults populated in a create form for a dataobject?