This tutorial will help you to style the radio button list on form. Using template, separator, style and label options, We can give proper style to radio button. <div class=”row”> <?php echo $form->labelEx($model,’isactive’); ?> <?php echo $form->radioButtonList($model,’isactive’, array(‘1’=>’Active’,’0’=>’Inactive’), array( ‘template’=>'{input}{label}’, ‘separator’=>”, ‘labelOptions’=>array( ‘style’=> ‘ padding-left:13px; width: 60px; float: left; ‘), ‘style’=>’float:left;’, ) ); ?> <div […]
Category Archives: Yii Framework
This tutorial will useful to change your yiiframework website to maintenance mode. User can access maintenance file only. Maintenance Controller Maintence File Maintenance Controller Make or Point the controller action to maintenance mode. 1 return array( 2 ‘catchAllRequest’=> array(‘site/maintenance’), 3 ………… 4 ………… Maintence File Make or Point the file to maintenance mode. If the condition file_exists() […]
CSqlDataProvider implements a data provider based on a plain SQL statement. This tutorial will help you to display the custom sql query result into cgridview as normal crud view. But dont forget to remove the semicolon in custom sql statement Because it will create error on count query. Controller.php <?php ……….. public function actionPending(){ $sql=”SELECT […]
This tutorial will help you to create a custom access method. I have done this method using “module-controller-action” method like “employee_employee_admin”. Here i used the getState and setState method to show the dynamic error file with message(You can try better than this method). Before access the page we can validate the data using this method. […]
Here i added the code for CListview of yii. Using this we can assign the parent tag name and class of parent tag to CListview. <?php $this->widget(‘zii.widgets.CListView’, array( ‘id’=>’commentslistview’, /** tag name **/ ‘itemsTagName’=>’ul’, /** calss name **/ ‘itemsCssClass’=>’commentslist’, ‘dataProvider’=>$commentsProvider, ‘itemView’=>’_comments’, )); ?>
I learned “How To Create Widget” in yii. Just i created welcome widget for my application. What is widget Create Widget Class Create Widget View Call Widget function What is widget Widget is a small gadget.An application or a component of an interface, that enables a user to perform a function or access a service. […]
Is Rating or Voting concept available in yii? Yes It Is available in yii framework. CStarRating class show the star rating widget in yii framework. It is used to get the rating details of user. It is based on jQuery Star Rating Plugin. We can show this star and assign the value to this stars. […]