hello, i am trying to implement http://www.yiiframework.com/wiki/185/clistview-ajax-filtering and everything work fine, but the problem is when the checkboxes none are checked, data result show last checked checkboxes, what i want is to show all the data, anybody know how to solve this?
Hi friend,
I need Select all fields in my form... I`m using the following codes from select the fileds... Please help me
<?php
$session=new CHttpSession;
$session->open();
$value2=$session['societyId'];
$sql = "SELECT flat_number FROM tbl_apartment where flat_number NOT in (select flat_number from tbl_flatchargesmapping where societyid=".$value2.") and societyid=".$value2."";
$codes = Apartment::model()->findAllBySql($sql);
echo '<tr>';
foreach($codes as $key=>$data)
{
echo "<td class='checkbox'>";
echo $form->checkBox($model, 'flat_number['.$key.']', array('value'=>$data['flat_number'],'uncheckValue'=>'N'), array('class'=>'style1'));
//echo $form->hiddenfield($model, 'description['.$key.']', array('value'=>$data['flat_number'],'uncheckValue'=>'N'), array('class'=>'style1'));
echo '<label>'.$data['flat_number'].'</label>';
if($key%10==0&&$key!=0){
echo '</tr><tr>';
}
}
?>
Thanks in Advance
ptsuthakar
(Ptsuthakar90)
March 10, 2012, 8:19am
3
Hi friend,
I need Select all fields in my form... I`m using the following codes from select the fileds... Please help me
<?php
$session=new CHttpSession;
$session->open();
$value2=$session['societyId'];
$sql = "SELECT flat_number FROM tbl_apartment where flat_number NOT in (select flat_number from tbl_flatchargesmapping where societyid=".$value2.") and societyid=".$value2."";
$codes = Apartment::model()->findAllBySql($sql);
echo '<tr>';
foreach($codes as $key=>$data)
{
echo "<td class='checkbox'>";
echo $form->checkBox($model, 'flat_number['.$key.']', array('value'=>$data['flat_number'],'uncheckValue'=>'N'), array('class'=>'style1'));
//echo $form->hiddenfield($model, 'description['.$key.']', array('value'=>$data['flat_number'],'uncheckValue'=>'N'), array('class'=>'style1'));
echo '<label>'.$data['flat_number'].'</label>';
if($key%10==0&&$key!=0){
echo '</tr><tr>';
}
}
?>
Thanks in Advance
Once I clicked the Select All checkbox…It`ll select the Those Check Boxes…