-
yii2 activeform 替換 form-gruop How to add class to form-group div of ActiveField in YII2?
-
yii2 file input 如果需要有移除效果,要配置
initialPreviewConfig
參數
調用的控制器返回 json格式的數據即可,對json裡面的數據沒有要求
如在控制器中添加一個方法:
1 | public function actionRemoveImage($id){ |
参考: How add one more button to yii2-widget-fileinput?
- yii2 下載文件
使用 yii2的sendfile方法
1 | function actionDownload() |
- yii2 實現類似 required_if 的功能
Yii2: Conditional Validator always returns required
-
词
number spinner
数值微调器 -
yii2 Select2 Widget 二級聯動
參考
- krajee Select2 Settings 裡面有
pluginEvents
- select2 plugin Add, select, or clear items select2 中添加元素和清空選項
- Yii2.0 实现三级联动 yii2的多級聯動參考
- yii2 grid view show footer
在 girdview
中添加 'showFooter'=>true,
, gridview中就會顯示table footer部分,在需要顯示的列中,添加 'footer'=> ''
,就會顯示對應的值
eg.
1 | $total = 0; |
1 | <?= GridView::widget([ |