Ticket #1136 (new defect)

Opened 19 months ago

Last modified 7 weeks ago

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).

Change History

Changed 13 months ago by sminnee

  • harvest_task set to (Unknown)
  • invoice_sent set to 0
  • milestone 2.1.0 deleted

Changed 13 months ago by sminnee

  • milestone set to 2.2.1

Let's get this sorted. Making the basic behaviour of our core classes more consistent / reliable is going to speed up development of all our sites :-)

Changed 10 months ago by sminnee

  • milestone changed from 2.2.2 feature-lock to 2.2.3 feature-lock

Changed 2 months ago by sminnee

  • milestone changed from 2.2.3* to 2.3.0

Changed 7 weeks ago by sminnee

  • milestone changed from 2.3.0 to 2.4.0
Note: See TracTickets for help on using tickets.