Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

yii2 activeform

<?php
use yiihelpersHtml;
use yiiwidgetsActiveForm;

$form = ActiveForm::begin([
    'id' => 'login-form',
    'options' => ['class' => 'form-horizontal'],
]) ?>
    <?= $form->field($model, 'username') ?>
    <?= $form->field($model, 'password')->passwordInput() ?>

    <div class="form-group">
        <div class="col-lg-offset-1 col-lg-11">
            <?= Html::submitButton('Login', ['class' => 'btn btn-primary']) ?>
        </div>
    </div>
<?php ActiveForm::end() ?>
Source by www.yiiframework.com #
 
PREVIOUS NEXT
Tagged: #activeform
ADD COMMENT
Topic
Name
1+8 =