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.

Form Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Checkbox won't update value


Go to End


1060 Views

Avatar
Joures

Community Member, 7 Posts

13 October 2011 at 6:44am

Got some problems with a checkbox.
Here's my code:

  static $db = array(
    'OwnerName' => 'Text',
    'VehicleRegNum' => 'Text',
    'Installed' => 'Boolean'
  );

  function getFrontendFields(){
    
    $fields = $this->scaffoldFormFields();
    
    return $fields;
    
  }

This returns a checkbox for the boolean field, but there's nothing boolean about it.
The value never gets updated no matter how many times i uncheck and check the box.

Any ideas?