Hi,
I'm able to do the following for all checkboxes in a set (in an action):
$this->form->getWidget('some_form_field')->setAttribute('checked', 'checked');
... but I'm unable to set specific checkboxes to ticked on the basis of data returned from the db.
I'm after something like:
$this->form->getWidget('some_form_field')->setAttributes(array(....));
... where I can refer to the specific checkboxes to be ticked somehow, or pass an array to it.
There's nothing in the symfony documentation on this specifically and I've had enough of trying a dozen combinations to get it work.
Any help would be appreciated.
Thanks.