I have code which dynamically fills my checkboxes group below (based on a query which I did not include here): I have added a bit of code (in bold) to try and show these as "checked" but it is not working. How do I modify the code below to check off a checkbox in a group. I am going to use this with an if statement later and grab only checked off boxes for which the user has already checked off in a previous form. This form is a pre-loaded form with existing DB data. The field is a checkbox group and is dynamically loaded from a DB table. All I need is the proper code to access the "checked" value of a row.
Thank you in advance for your help.
Dawna
$results = $db->loadObjectList();
foreach ($results as $row) :
$form->data['options'][] = array ('value' => $row->user_id, 'text' =>$row->name, 'checked'=>"checked");
endforeach;
Thank you in advance for your help.
Dawna