Reputation: 172
Bootstrap Button does not submit When Enter Button is Pressed. I have tried all things possible and read as many things i found, yet unable to solve it. The Button works when clicked but when the Enter Button is Pressed, it does not send the Submit Button but Submit other input fields
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title text-center"> Sign In to School Hub </h3>
</div>
<div class="panel-body">
<?php
if (isset($_GET['recode'])) {
$Recode = urldecode($_GET['recode']);
if ($Recode == 2) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">× </button>
Invalid Username and/or Password, Please Try Again
</div>
<?php
} elseif ($Recode == 2) {
?>
<div class="alert alert-danger alert-dismissable">
<button type="button" class="close"
data-dismiss="alert" aria-hidden="true">×
</button>
Unable to Complete SignUp, Please Try Again
</div>
<?php
}
}
?>
<form method="post" action="Server/NewUser.php"
id="NewLogin">
<div class="col-md-12" style="margin-top: 10px">
<div class="form-group">
<label class="control-label" for="Email">Email Address</label>
<input type="text" name="Email" id="Email" class="form-control "/>
</div>
</div>
<div class="col-md-12" style="margin-top: 10px">
<div class="form-group">
<label class="control-label"
for="Pswd">Password</label>
<input type="password" name="Pswd"
id="Pswd" class="form-control "/>
</div>
</div>
<div class="col-md-12" style="margin-top: 20px">
<input type="checkbox" name="Keepme"
value="Keepme"> Keep Me SignIn
</div>
<div class="col-md-12" style="margin-top: 20px">
<div class="form-group">
<input type="submit" class="btn btn-
success pull-right" name="SignIn"
value="Sign In"/>
</div>
</div>
<div class="col-md-12" style="margin-top: 20px">
<p>Not Yet Registered, Click Here to <a
href="SignUp.php">Sign Up</a></p>
</div>
</form>
</div>
</div>
Please help review Any help is well appreciated
Upvotes: 1
Views: 510
Reputation: 93
you can declare onclick
to Button and in another hand Pass a Javascript Function... search about send GET an POST Request in JavaScript... you do it easily... :)
Upvotes: 1