Advertisement
nazmiwafiy

_form.php

Dec 6th, 2018
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  1. <?php
  2.  
  3. use yii\helpers\Html;
  4. use yii\widgets\ActiveForm;
  5.  
  6. /* @var $this yii\web\View */
  7. /* @var $model frontend\models\Contact */
  8. /* @var $form yii\widgets\ActiveForm */
  9. ?>
  10.  
  11. <div class="contact-form">
  12.  
  13.     <?php $form = ActiveForm::begin(); ?>
  14.  
  15.     <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
  16.  
  17.     <?= $form->field($model, 'email')->textInput(['maxlength' => true]) ?>
  18.  
  19.     <div class="form-group">
  20.         <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
  21.     </div>
  22.  
  23.     <?php ActiveForm::end(); ?>
  24.  
  25. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement