您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
1.1KB

  1. <?php
  2. use yii\helpers\Html;
  3. use yii\bootstrap\ActiveForm;
  4. use yii\captcha\Captcha;
  5. /* @var $this yii\web\View */
  6. /* @var $form yii\bootstrap\ActiveForm */
  7. $this->title = 'Contact';
  8. $this->params['breadcrumbs'][] = $this->title;
  9. ?>
  10. <div class="site-contact">
  11. <h1><?= Html::encode($this->title) ?></h1>
  12. <div class="row">
  13. <div class="col-lg-5">
  14. <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
  15. <?= $form->field($model, 'name') ?>
  16. <?= $form->field($model, 'email') ?>
  17. <?= $form->field($model, 'subject') ?>
  18. <?= $form->field($model, 'body')->textArea(['rows' => 6]) ?>
  19. <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
  20. 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
  21. ]) ?>
  22. <div class="form-group">
  23. <?= Html::submitButton('Envoyer', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
  24. </div>
  25. <?php ActiveForm::end(); ?>
  26. </div>
  27. </div>
  28. </div>