私は自分のフォームを検証するためにhttp://bootstrapvalidator.com/プラグインを使用しているブートストラップでサインアップページに取り組んでいます。すべての検証が完了しましたが、送信ボタンをクリックすると無効になり、データが次の php ファイルに送信されません。助けてください。私のコードは以下のとおりです。 HTMLコード
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css"/>
<link rel="stylesheet" href="bootstrap/css/bootstrapValidator.min.css"/>
<script type="text/javascript" src="bootstrap/js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<!-- Either use the compressed version (recommended in the production site) -->
<script type="text/javascript" src="bootstrap/js/bootstrapValidator.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#signupbox').bootstrapValidator({
live: 'enabled',
message: 'This value is not valid',
feedbackIcons: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
firstName: {
validators: {
notEmpty: {
message: ' '
},
stringLength: {
min: 2,
max: 30,
message: ' '
},
regexp: {
regexp: /^[a-zA-Z ]+$/,
message: ' '
}
}
},
lastName: {
validators: {
notEmpty: {
message: ' '
},
stringLength: {
min: 3,
max: 30,
message: ' '
},
regexp: {
regexp: /^[a-zA-Z ]+$/,
message: ' '
}
}
},
email: {
validators: {
notEmpty: {
message: ' '
},
emailAddress: {
message: 'The input is not a valid email address'
},
regexp: {
regexp: /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i,
message: ' '
}
}
},
password: {
validators: {
notEmpty: {
message: 'The password is required and cannot be empty'
},
}
},
confirmPassword: {
validators: {
notEmpty: {
message: 'The confirm password is required and cannot be empty'
},
identical: {
field: 'password',
message: ' '
}
}
}
}
});
// Validate the form manually
});
</script>
</head>
<body>
<div id="signupbox" style="margin-top:50px;" class="mainbox col-md-4 col-md-offset-4 col-sm-1 col-sm-offset-3">
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title">Sign Up</div>
<div style="float:right; font-size: 85%; position: relative; top:-15px"><a id="signinlink" href="login.php">Sign In</a></div>
</div>
<div class="panel-body" >
<form id="signupform" class="form-horizontal" action="submit.php" method="GET" role="form" >
<div id="signupalert" style="display:none" class="alert alert-danger">
<p>Error:</p>
<span></span>
</div>
<div class="form-group">
<div class="col-lg-6">
<input type="text" class="form-control" name="firstName" placeholder="First name" />
</div>
<div class="col-lg-6">
<input type="text" class="form-control" name="lastName" placeholder="Last name" />
</div>
</div>
<div class="form-group has-feedback">
<div class="col-md-12">
<input type="text" class="form-control" name="email" placeholder="Email Address">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<input type="date" class="form-control" name="bday" placeholder="Date of Birth">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<input type="password" class="form-control" name="password" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<input type="password" class="form-control" name="confirmPassword" placeholder="Confirm Password">
</div>
</div>
<div class="form-group">
<!-- Button -->
<div class="col-md-offset-0 col-md-9">
<input type="submit" id="submit" style="float:left;" class="btn btn-info" value="Signup">
</div>
</div>
</form>
</div>
</div>
</div>
</body>