Пример #1
0
    <?php 
echo $form->field($model, 'name')->textInput();
?>

    <?php 
echo $form->field($model, 'url')->widget(\sibds\widgets\translitInput::className(), ['fromField' => 'name']);
?>

    <?php 
echo $form->field($model, 'image')->widget(\sibds\widgets\InputFile::className());
?>

    <?php 
echo $form->field($model, 'layout')->widget(\kartik\select2\Select2::className(), ['data' => Yii::$app->controller->getLayouts(), 'options' => ['placeholder' => 'Значение по умолчанию'], 'addon' => ['prepend' => ['content' => \yii\bootstrap\Html::icon('open-file')]]]);
?>

    <?php 
echo $form->field($model, 'description')->widget(\sibds\widgets\CKEditor::className(), ['options' => ['rows' => 6]]);
?>

    <?php 
echo \sibds\form\FormFooter::widget(['model' => $model]);
?>

    <?php 
ActiveForm::end();
?>

</div>
Пример #2
0
    ?>

                    <?php 
    echo $form->field($model, 'name')->textInput(['autofocus' => true]);
    ?>

                    <?php 
    echo $form->field($model, 'email');
    ?>

                    <?php 
    echo $form->field($model, 'subject')->widget(\sibds\widgets\InputFile::className());
    ?>

                    <?php 
    echo $form->field($model, 'body')->widget(\sibds\widgets\CKEditor::className(), ['options' => ['rows' => 6, 'cols' => 80]]);
    ?>

                    <?php 
    echo $form->field($model, 'verifyCode')->widget(Captcha::className(), ['template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>']);
    ?>

                    <div class="form-group">
                        <?php 
    echo Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']);
    ?>
                    </div>

                <?php 
    ActiveForm::end();
    ?>