Ticket #1136 (new defect)
CheckboxSet field doesn't load member data into forms
| Reported by: | sharvey | Owned by: | aoneil |
|---|---|---|---|
| Priority: | medium | Milestone: | 2.4.0 |
| Component: | Sapphire Framework | Version: | 2.0 |
| Severity: | medium effort / impact | Keywords: | |
| Cc: | Hours: |
Description
The fourth argument for a CheckboxSetField? is supposed to be an array which loads the data from the member into the checkboxes on a form, but it doesn't work. It appears to not have been setup for this type of field, unlike a TextField?.
Example:
new CheckboxSetField?(
"NewsletterSubscriptions?", "Receive email notification of events in ", $sourceitems = DataObject::get("NewsletterType?")->toDropDownMap("GroupID","Title"), $selectedgroups = $member ? $member->Groups()->Map("ID","Title") : false )
);
Once you save the form with this it doesn't populate itself with the array when you use $this->loadNonBlankDataFrom($member).
