mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
#1652 - CheckboxSetField doesnt work when all fields unchecked
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44550 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
0b2ba8aed5
commit
abb6d23cef
@ -114,6 +114,8 @@ class CheckboxSetField extends OptionsetField {
|
||||
if($this->value){
|
||||
$this->value = str_replace(",", "{comma}", $this->value);
|
||||
$record->$fieldname = implode(",", $this->value);
|
||||
} else {
|
||||
$record->$fieldname = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -174,4 +176,4 @@ class CheckboxSetField extends OptionsetField {
|
||||
return FormField::ExtraOptions();
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user