Yii Framework Forum: Displaying Checkbox Input Form With Clistview & Yiibootstrap - Yii Framework Forum

Jump to content

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

Displaying Checkbox Input Form With Clistview & Yiibootstrap Rate Topic: -----

#1 User is offline   masapri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-July 12

Posted 06 February 2013 - 08:32 PM

Hi All,

I want to display items stored in database using Clistview and make them as checkbox selection input form.
However, using Yiibootstrap extension, how can I pass the $model variable to 'ItemView', since to generate checkbox, the following syntax is used:

<?php echo $form->checkboxRow($model, 'checkbox'); ?>

And an error is generated telling that system can't find $model

Thank you so much for your help!
0

#2 User is offline   masapri 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-July 12

Posted 07 February 2013 - 01:18 AM

Just found a solution!
Pass anything you like through parameter "viewData"

'viewData' => array( 'switch' => true, 'blah' => 123 ),

*Keep saying to myself RTFM,RTFM,RTFM!
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