Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* @var $this yii\web\View */
- use yii\widgets\ActiveForm;
- ?>
- <?php $form = ActiveForm::begin(['id' => uniqid()]); ?>
- <?php $form->enableAjaxValidation = true;?>
- <?= $form->field($model, 'name', [
- /* Опции template, selectors, options изменены для соответствия сторонней верстке */
- 'template' => '
- <div class="form-callback-name field half first">
- {input}
- {error}
- </div>
- ',
- 'selectors' => [
- 'container' => '.form-callback-name.field',
- 'input' => '.form-callback-name input',
- 'error' => '.form-callback-name .help-block',
- ],
- 'options' => [
- 'tag' => null, // Don't wrap with "form-group" div
- ],
- 'inputOptions' => [
- 'placeholder' => 'Имя',
- ]
- ])->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'email', [
- 'template' => '
- <div class="form-callback-email field half">
- {input}
- {error}
- </div>
- ',
- 'selectors' => [
- 'container' => '.form-callback-email.field',
- 'input' => '.form-callback-email input',
- 'error' => '.form-callback-email .help-block',
- ],
- 'options' => [
- 'tag' => null, // Don't wrap with "form-group" div
- ],
- 'inputOptions' => [
- 'placeholder' => 'E-mail',
- ]
- ])->textInput(['maxlength' => true]) ?>
- <?= $form->field($model, 'comment', [
- 'template' => '
- <div class="form-callback-comment field">
- {input}
- {error}
- </div>
- ',
- 'selectors' => [
- 'container' => '.form-callback-comment.field',
- 'input' => '.form-callback-comment textarea',
- 'error' => '.form-callback-comment .help-block',
- ],
- 'options' => [
- 'tag' => null, // Don't wrap with "form-group" div
- ],
- 'inputOptions' => [
- 'placeholder' => 'Сообщение',
- ]
- ])->textarea(['rows' => 2]) ?>
- <ul class="actions">
- <li><input type="submit" value="Отправить" class="special" /></li>
- </ul>
- <?php ActiveForm::end(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement