标签:
<?= $form->field($model, ‘username‘, [ ‘inputTemplate‘ => ‘<div class="input-group"><span class="input-group-addon">@</span>{input}</div>‘, ])?>
添加属性的方法(注意inputOptions的使用):
<?= $form->field($model, ‘username‘, [ ‘inputTemplate‘ => ‘<div class="input-group"><span class="input-group-addon">@</span>{input}</div>‘, ‘inputOptions‘ => [ ‘placeholder‘ => $model->getAttributeLabel(‘username‘), ], ])?>
标签:
原文地址:http://www.cnblogs.com/shaoing/p/5344473.html