How to add multiple checkboxes in form_fields()

edited April 2013 in Modules
I did try to add multiple check boxes but i was getting only one check box.

Comments

  • edited 10:20PM
    What is this referencing?
  • edited 10:20PM
    Check below code
    $options = array ('1'=> '1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7');
    $fields['user_score'] = array('label' => 'Hotel Star Rating','first_option' => 'Please Select','options' =>$options , 'type' =>'checkbox' );
  • edited 10:20PM
    $options = array ('1'=> '1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7');
    $fields['user_score'] = array('label' => 'Hotel Star Rating','options' =>$options , 'type' =>'checkbox' )
  • edited 10:20PM
    Try type of "multi" with "mode" => 'checkbox'.
  • edited 10:20PM
    Thanks a lot
Sign In or Register to comment.