pre-check some items with checkbox plugins

linque

Member
I use a 'checkbox' plugins for an element.
I use the following example to populate the checkbox list.

$db = JFactory::getDbo();
$db->setQuery('SELECT id, text FROM #__tablename');
$rows = $db->loadObjectList();
foreach ($rows as $row) {
$options[] = JHTML::_('select.option', $row->id, $row->text);
}
return $options;

All elements are unchecked. I would like to pre-check some of them.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top