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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -