I am trying to create a list of checkboxes, each one with its specific ID, so I tried:
$mform->addElement('checkbox', 'groups[]', 'Group Two', null, array('value' => 2));
But the value above is not set to 2.
I tried to set the value of an unknown attribute:
$mform->addElement('checkbox', 'groups[]', 'Group Three', null, array('test' => 'test_value'));
And the attribute test is correctly set to value test_value.
Said that, what I need to do to set the value of "value" attribute?
Thank you.