Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » checkbox in widget not saving

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

Page: 1
Go to End
Author Topic: 838 Views
  • marcink
    Avatar
    Community Member
    89 Posts

    checkbox in widget not saving Link to this post

    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

    838 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.