using a checkbox array in a plugin's admin settings page

i've been creating an admin panel for the related-items plugin in 1.8 and encountered an issue with storing and retrieving settings which use an array.

i need to list the active subtypes in the system and allow the admins to check one or more of them and for this list of selected subtypes to be stored in the plugin's settings.

i looked at the view-counter plugin as this already contains a solution for this issue and copied the code.. what occurred was that the list of valid subtypes and checkboxes showed correctly but the values are not being stored or retrieved for the plugin (as with the other plugin setting variables).

my present version of this uses the elgg-checkboxes view (which view-counter does not use) and i still have the same problem.

echo elgg_view('input/checkboxes',array(
'name'=>'params[selectfrom_subtypes]',
'value'=>$selectfrom_subtypes,
'options'=>$valid_types ,
'align'=>'horizontal',
'default' => ''));

with this version, the checkboxes are not set for the values that are passed in the array (selectfrom_subtypes) - this part was manually coded in the views-counter plugin..

so i'm looking for people who know how the checkboxes view is intended to be used and/or people who just know what i'm missing to point me in the right direction here.

anyone? thanks