Beispiel #1
0
$form = \kartik\form\ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'enableClientValidation' => false, 'formConfig' => ['labelSpan' => 4, 'deviceSize' => ActiveForm::SIZE_SMALL]]);
?>
            <div class="api-user-form box-body">
                <div id="check">
                <?php 
echo $form->field($model, 'UserName')->textInput(['maxlength' => true, 'autocomplete' => 'off', 'datatype' => 's3-12', 'ajaxurl' => \yii\helpers\Url::to('/sign/check'), 'nullmsg' => "请输入用户名 !"]);
?>
                <?php 
echo $form->field($model, 'Password')->passwordInput(['maxlength' => true, 'datatype' => '*', 'nullmsg' => "请输入密码 !"]);
?>
                <?php 
echo $form->field($model, 'Phone')->textInput(['maxlength' => true, 'datatype' => 'n11-11', 'ajaxurl' => \yii\helpers\Url::to('/sign/check'), 'nullmsg' => "请输入手机号 !", 'errormsg' => '手机号格式错误']);
?>
                </div>
                <?php 
echo $form->field($model, 'smsCode')->widget(\app\core\widgets\VerifySms::className(), ['template' => '<div class="row"><div class="col-lg-6">{input}</div><div class="col-lg-6">{button}</div><div style="clear: both; padding-left:15px;"></div></div>', 'options' => ['class' => 'form-control', 'datatype' => 'smsCode', 'nullmsg' => "请输入验证码 !", 'errormsg' => '验证码错误']]);
?>
            </div>
            <div class="box-footer" style="margin-top: 20px;">
                <?php 
echo Html::submitButton('立即注册', ['class' => 'regBtn', 'name' => 'reg']);
?>
            </div>
            <?php 
ActiveForm::end();
?>

        </div>
    </div>
</div>
Beispiel #2
0
/* @var $this yii\web\View */
/* @var $modelapp\models\ApiUser */
/* @var $form yii\widgets\ActiveForm */
?>

<?php 
$form = ActiveForm::begin();
?>
<div class="api-user-form box-body">

    <?php 
echo $form->field($model, 'Phone')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'smsCode')->widget(\app\core\widgets\VerifySms::className(), ['template' => '<div class="row"><div class="col-lg-3">{input}</div><div class="col-lg-6">{button}</div></div>']);
?>

    <?php 
echo $form->field($model, 'UserName')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'Password')->passwordInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'TrueName')->textInput(['maxlength' => true]);
?>