yii implements the method of displaying CheckBox check boxes in the same line, yiicheckbox_PHP tutorial

WBOY
Release: 2016-07-13 10:12:21
Original
1040 people have browsed it

Yii implements the method of displaying CheckBox check boxes in the same line, yiicheckbox

The example in this article describes how Yii implements CheckBox check boxes to be displayed in the same row. Share it with everyone for your reference. The specific implementation method is as follows:

yii allows CheckBoxList to output a new line by default. A checkbox is a new line, which is not satisfactory for some settings. Let's implement yii to make CheckBoxList display on the same line.
Yii's checkBoxList is a column, as shown in the figure below:

Someone said on the Internet

Copy code The code is as follows:
$form->checkBoxList($model,'like',array(1=>'Basketball', 2=>'Badminton',3=>'Music'),array('template'=>'{input}{label}',' separator'=>' ')

This can be achieved but I found that the effect is still not good. I hope everyone will stop using this line.

My solution is to use yiibooster’s checkBoxListInlineRow to implement , as shown in the figure below:

I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/920976.htmlTechArticleYii implements the CheckBox checkbox display method in the same line, yiicheckbox This article describes the implementation of the CheckBox checkbox in yii Methods shown on the same line. Share it with everyone for your reference. Specifically...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template