Yii Framework Forum: Chtml Checkboxlist selection limit - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chtml Checkboxlist selection limit Rate Topic: -----

#1 User is offline   alren 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 11-November 13

Posted 07 April 2017 - 09:36 AM

Hi .
I want to create form with chtml without model. I'm using chtml:checkboxlist and I want to only 2 selection on checkboxlist but i dont apply limit for checkboxlist . How can do it?

<?php
$selected_ids=array();
$data_list= array('1'=>'One','2'=>'Two','3'=>'uc','4'=>'dort');

echo CHtml::checkBoxList('list_name', $selected_ids, $data_list,
array(
'onclick'=>'javascript:chkcontrol();',)
);
?>
0

#2 User is offline   reykel 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 67
  • Joined: 21-June 15
  • Location:Camaguey, Cuba

Posted 07 April 2017 - 07:20 PM

Sorry, I'm not sure I get what you're trying to do. Be a little more specific please...
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users