Yii Framework Forum: Bootstrap Checkbox - Yii Framework Forum

Jump to content

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

Bootstrap Checkbox Problem with Boostrap extension checkBox(Row) Rate Topic: -----

#1 User is offline   camus 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 11-April 11

Posted 27 February 2013 - 12:58 PM

If you want update model in Bootstrap extensions designed form, value of checkBox or checkBoxRow is everytime 0 regardless on DB table value. No effect explicitly coded:
<?php echo $form->checkBoxRow($model, 'active', array('checked' => true)); ?>

You can solve this problem by adding 1 row before last row and modifying last row in activeCheckBox method of TbHtml class (bootstrap.helpers.TbHtml):
$check = self::popOption('checked', $htmlOptions,false);
return $hidden . self::checkBox($name, $check, $htmlOptions);

1

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