form styles are changeds

This commit is contained in:
2023-04-18 20:37:05 +05:30
parent 58143fd8d6
commit 7b54670c3a
7 changed files with 204 additions and 121 deletions
+59 -49
View File
@@ -36,6 +36,15 @@
.error{
color: red;
}
#anwi_contact-form button{
border: none;
background-color: #0A1039;
text-transform: uppercase;
font-weight: 600;
padding: 9px 25px;
color: #fff;
font-size: 13px;
}
</style>
</head>
@@ -56,7 +65,7 @@
</div>
</div>
</section>
<section class="contact-section py-md-5 py-3">
<section class="contact-section py-md-5 py-3 bg-gradient-violet">
<div class="container pt-md-5 pt-3">
<div class="row bg-white rounded-3 shadow mx-0">
<div class="col-lg-6 col-12 mb-30 bg-gradient-anwi text-white p-md-5 p-4">
@@ -87,22 +96,23 @@
<!-- <h3 class="contact-page-title border-0">Please fill the details so that our experts will get back to you.</h3> -->
<h2 class="fw-500 text-center">Tell Us your Message</h3>
<div class="contact-form account-details-form">
<form id="anwi_contact-form" class="single-input-item" autocomplete="off" method="POST">
<div class="form-group pb-2">
<label>Your Name <span class="required text-danger">*</span></label>
<input type="text" name="contactname" id="user_name" class="w-100 form-control shadow-none rounded-0" required>
<form id="anwi_contact-form" class="form-floating" autocomplete="off" method="POST">
<div class="form-floating mb-3">
<input type="text" class="form-control shadow-none" name="contactname" id="user_name" placeholder="jhon" required>
<label for="user_name">Your Name </label>
</div>
<div class="form-group pb-3">
<label>Number <span class="required text-danger">*</span></label>
<input type="number" id="user_number" class="w-100 form-control shadow-none rounded-0" required pattern="/^-?\d+\.?\d*$/" autocomplete="off" onkeypress="if(this.value.length==10) return false;" name="contactnumber" maxlength="10">
<div class="form-floating mb-3">
<input type="text" class="form-control shadow-none" name="contactnumber" id="user_number" placeholder="9887767644" required pattern="/^-?\d+\.?\d*$/" autocomplete="off" onkeypress="if(this.value.length==10) return false;" name="contactnumber" maxlength="10">
<label for="user_number">Number</label>
</div>
<div class="form-group pb-3">
<label>Your Email <span class="required text-danger">*</span></label>
<input type="email" name="contactemail" id="user_email" class="w-100 form-control shadow-none rounded-0" required>
<div class="form-floating mb-3">
<input type="email" class="form-control shadow-none" name="contactname" id="user_email" placeholder="exp12@gmail.com" required>
<label for="user_email">Email</label>
</div>
<div class="form-group pb-md-5 pb-2">
<label>Your Message</label>
<textarea name="contactmessage" class="pb-10 w-100 form-control shadow-none rounded-0" id="user_message" rows="4" id="contactMessage"></textarea>
<div class="form-floating mb-3">
<textarea name="contactmessage" style="height: 100px" class="pb-10 w-100 form-control shadow-none rounded-0" id="user_message" rows="4" cols="5" id="contactMessage"></textarea>
<label for="user_message">Message</label>
</div>
<div class="form-group mb-0 text-end">
<button class="btn btn-lg single-btn w-lg-25" id="contact_form_submit">Submit</button>
@@ -196,41 +206,41 @@
// }
// })
$("#anwi_contact-form").validate({
rules: {
phone: {
minlength: 10,
maxlength: 10,
number: true
},
},
submitHandler: function(form ,e) {
e.preventDefault();
// $("#pageloader").css({"display":"block"});
$.ajax({
type: "POST",
url: "contact.php",
data: $(form).serialize(),
success: function(res) {
debugger;
if (res == 1) {
$(".pageloader").removeClass("is_open");
$(".overlay_effect").removeClass("is_open");
toastr.success('Success, Our Experts will get back to you!');
$(form).trigger("reset");
$(form).find('.form-control-placeholder').removeClass('floating-label');
$(this).addClass("d-none");
}else {
$(".pageloader").removeClass("is_open");
$(".overlay_effect").removeClass("is_open");
toastr.error('Something Went Wrong,Try Again!');
$("#biz-contact-form").removeClass("d-none");
}
}
});
return false;
}
});
// $("#anwi_contact-form").validate({
// rules: {
// phone: {
// minlength: 10,
// maxlength: 10,
// number: true
// },
// },
// submitHandler: function(form ,e) {
// e.preventDefault();
// // $("#pageloader").css({"display":"block"});
// $.ajax({
// type: "POST",
// url: "contact.php",
// data: $(form).serialize(),
// success: function(res) {
// debugger;
// if (res == 1) {
// $(".pageloader").removeClass("is_open");
// $(".overlay_effect").removeClass("is_open");
// toastr.success('Success, Our Experts will get back to you!');
// $(form).trigger("reset");
// $(form).find('.form-control-placeholder').removeClass('floating-label');
// $(this).addClass("d-none");
// }else {
// $(".pageloader").removeClass("is_open");
// $(".overlay_effect").removeClass("is_open");
// toastr.error('Something Went Wrong,Try Again!');
// $("#biz-contact-form").removeClass("d-none");
// }
// }
// });
// return false;
// }
// });
</script>
</body>