yii2 - Click a button twice to POST -
this view file signin page
<?php $form = activeform::begin(); ?> <?= $form->field( $model, 'email' )->textinput( [ 'maxlength' => 200 ], [ 'id' => 'email' ] ) ?> <?= $form->field( $model, 'password' )->passwordinput( [ 'maxlength' => 200 ] ) ?> <div class="form-group"> <div class="col-lg-offset-1 col-lg-14"> <?= html::submitbutton( 'login', [ 'class' => 'btn btn-danger btn-block btn-lg', 'name' => 'login-button' ] ) ?> </div> </div> <input type='sub' name='submit' value='reset password' class="btn btn-link btn-default" '> <?php activeform::end(); ?> it works have click on login button twice. there no other problem in signing in. don't have clue why have click login button twice.
firstly you've got syntax in input type='sub' @ end you've got ' instead of /. should render html::input, you'll avoid syntax.
secondly change input name. name='submit' brookes activeform. not sure why...
Comments
Post a Comment