Beispiel #1
0
echo $form->field($model, 'subject')->textInput(['maxlength' => true]);
?>
    <div class="form-group">
        <label>标题颜色:</label>
        <div class="input-group my-colorpicker2 colorpicker-element">
        <input type="text" class="form-control" name="RecommendData[color]" value="<?php 
echo $model->color;
?>
">
        <div class="input-group-addon">
        <i style="background-color: rgb(0, 0, 0);"></i>
        </div>
        </div><!-- /.input group -->
    </div>
    <?php 
echo $form->field($model, 'lid')->dropDownList(ArrayHelper::map(RecommendList::get(RecommendList::find()->asArray()->all()), 'id', 'label'), ['style' => 'width:auto;']);
?>

    <?php 
echo $form->field($model, 'summary')->widget('kucha\\ueditor\\UEditor', ['clientOptions' => ['initialFrameHeight' => '200', 'toolbars' => [['fullscreen', 'source', 'undo', 'redo', '|', 'fontsize', 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'removeformat', '|', 'forecolor', 'backcolor', '|']]]]);
?>
    <?php 
echo $form->field($model, 'img')->fileInput();
?>
    <?php 
if ($model->img) {
    echo '<img id="preview" src="' . Yii::$app->params['siteurl']['frontend'] . $model->img . '">';
}
?>
    <?php 
echo $form->field($model, 'url')->textInput(['maxlength' => true]);