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

checkbox in widget not saving


Go to End


1345 Views

Avatar
marcink

Community Member, 89 Posts

24 April 2009 at 7:45am

hi,

i made a widget with three inputs

static $db = array(
"Title" => "Varchar",
"RSSFeed" => "Text",
"ShowRSS" => "Boolean"
);

my getCMSField function looks like:

function getCMSFields() {
return new FieldSet(
new TextField("Title", "Title"),
new TextField("RSSFeed", "RSS Feed"),
new CheckboxField("ShowRSS", "Show RSS Link?")
);
}

but after checking the checkbox and saving, the checkbox is not saved in db.
the db field is created properly, but no value is written to it.

the other fields are ok.

is it because of the widget?

thanks