yii2-test-1/frontend/views/news/data.php

33 lines
908 B
PHP
Raw Normal View History

2023-05-06 20:40:02 +03:00
<?php
/** @var yii\web\View $this */
/** @var yii\bootstrap5\ActiveForm $form */
/** @var \frontend\models\DataForm $model */
use yii\bootstrap5\Html;
use yii\bootstrap5\ActiveForm;
use yii\captcha\Captcha;
?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'fio')->textInput(['autofocus' => true]) ?>
<?= $form->field($model, 'email') ?>
<?= $form->field($model, 'phone')->widget(\yii\widgets\MaskedInput::class,
['mask' => '+7 (999) 999-99-99']
)->textInput(['placeholder' => '+7 (999) 999-99-99', 'class' => ''])->label('Ваш Телефон'); ?>
<div class="form-group">
<?= Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
</div>