_form.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use yii\helpers\Html;
  3. use yii\widgets\ActiveForm;
  4. /** @var yii\web\View $this */
  5. /** @var manager\models\Comments $model */
  6. /** @var yii\widgets\ActiveForm $form */
  7. ?>
  8. <div class="comments-form">
  9. <?php $form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]) ?>
  10. <?= $form->field($model, 'id')->textInput() ?>
  11. <?= $form->field($model, 'news_id')->textInput() ?>
  12. <?= $form->field($model, 'visible')->dropDownList([ 'Y' => 'Y', 'N' => 'N', ], ['prompt' => '']) ?>
  13. <?= $form->field($model, 'message')->textarea(['rows' => 6]) ?>
  14. <?= $form->field($model, 'ip_address')->textInput(['maxlength' => true]) ?>
  15. <?= $form->field($model, 'user_agent')->textarea(['rows' => 6]) ?>
  16. <?= $form->field($model, 'created_by_user_id')->textInput(['maxlength' => true]) ?>
  17. <?= $form->field($model, 'created_at')->textInput() ?>
  18. <div class="form-group">
  19. <?= Html::submitButton('Save', ['class' => 'btn btn-success']) ?>
  20. </div>
  21. <?php ActiveForm::end(); ?>
  22. </div>