Posted by mayur.pimple on June 25, 2012 at 6:04am
Hi
I had create form in drupal.
function cblocks_page_form() {
$form['item'][$i]['iselect'] = array(
'#type' => 'checkbox',
'#return_value' => $key[$i]['id'],
'#attributes' => array('class' => 'checkb'),
'#required' => TRUE,
'#prefix' => '
<
div class="irowl">');
return $form;
}
so i had create multipal checkbox.
so how to get multipal checkbox values from form.
Thanks
Mayur
Comments
got the solution
$form['item'][$i]['iselect[]']
array is pass in iselect in name.
and get value from $id=$_POST['iselect']
use #type as checkboxes
Try and use #type as checkboxes and pass and array to the value param...To get all checked ones would be a cakewalk
thanks Prafful
thanks