This article mainly introduces how to display the CheckBox check box in the same row in yii, compares the methods collected on the Internet, and provides suggestions for improvement, which is of practical value. For more information, see
This article mainly introduces how to display the CheckBox check box in the same row in yii, compares the methods collected on the Internet, and provides suggestions for improvement, which is of practical value. For more information, see
This example describes how to display the CheckBox check box in the same row in yii. Share it with you for your reference. The specific implementation method is as follows:
Yii enables CheckBoxList to output a line break by default, and a checkbox is replaced by a line, which is not required for some settings. Next we will implement yii to display CheckBoxList in the same line.
The checkBoxList of Yii is a column, as shown in:
Someone said on the Internet
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 you will not use this line any more.
My solution is to implement checkBoxListInlineRow of yiibooster, as shown in:
I hope this article will help you design PHP programs based on the Yii framework.