0
0

contact.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /* @var $this yii\web\View */
  3. /* @var $form yii\bootstrap\ActiveForm */
  4. /* @var $model \frontend\models\ContactForm */
  5. use yii\helpers\Html;
  6. use yii\bootstrap\ActiveForm;
  7. use yii\captcha\Captcha;
  8. $this->title = '联系我们';
  9. $this->params['breadcrumbs'][] = $this->title;
  10. ?>
  11. <div class="site-contact">
  12. <h1><?= Html::encode($this->title) ?></h1>
  13. <p>
  14. 如果您有业务问题或其他问题,请填写以下表格与我们联系。谢谢您.
  15. </p>
  16. <div class="row">
  17. <div class="col-lg-5">
  18. <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
  19. <?= $form->field($model, 'name')->textInput(['autofocus' => true]) ?>
  20. <?= $form->field($model, 'email') ?>
  21. <?= $form->field($model, 'subject') ?>
  22. <?= $form->field($model, 'body')->textarea(['rows' => 6]) ?>
  23. <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [
  24. 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>',
  25. ]) ?>
  26. <div class="form-group">
  27. <?= Html::submitButton('提交', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
  28. </div>
  29. <?php ActiveForm::end(); ?>
  30. </div>
  31. </div>
  32. </div>