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 8:42PM
    What is this referencing?
  • edited 8:42PM
    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 8:42PM
    $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 8:42PM
    Try type of "multi" with "mode" => 'checkbox'.
  • edited 8:42PM
    Thanks a lot
Sign In or Register to comment.