|
|
|
@ -57,38 +57,43 @@ |
|
|
|
|
<div class="form-sec"> |
|
|
|
|
<h1>Send us a Message!</h1> |
|
|
|
|
<p>If you have any queries, let us know.</p> |
|
|
|
|
<form action="{{url('contact')}}" method = "post"> |
|
|
|
|
<form action="{{url('contact')}}" method = "post" onsubmit="return validateContact()"> |
|
|
|
|
@csrf |
|
|
|
|
<div class="row gy-4"> |
|
|
|
|
<div class="col-md-6"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="">Full Name</label> |
|
|
|
|
<input type="text" name = "full_name" class="form-control" placeholder="Your full name" required> |
|
|
|
|
<input type="text" name = "full_name" class="form-control" id="contact-fullname" value="" placeholder="Your full name" onkeyup="contactFullname()"> |
|
|
|
|
</div> |
|
|
|
|
<span class="error" id='contact-fname-error'></span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-md-6"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="">Email address</label> |
|
|
|
|
<input type="email" name = "email" class="form-control" placeholder="Your email address" required> |
|
|
|
|
<input type="email" name = "email" class="form-control" placeholder="Your email address" value="" onkeyup="contactEmail()"> |
|
|
|
|
</div> |
|
|
|
|
<span class="error" id='contact-email-error'></span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-md-6"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="">Phone number</label> |
|
|
|
|
<input type="number" name = "phone" class="form-control" placeholder="Your phone number" required> |
|
|
|
|
<input type="number" name = "phone" class="form-control" placeholder="Your phone number" value="" onkeyup="contactPhone()"> |
|
|
|
|
</div> |
|
|
|
|
<span class="error" id='contact-phone-error'></span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-md-6"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="">Nationality</label> |
|
|
|
|
<input type="text" name = "nationality" class="form-control" placeholder="Your nationality"> |
|
|
|
|
</div> |
|
|
|
|
<span class="error" id='contact-nationality-error'></span> |
|
|
|
|
</div> |
|
|
|
|
<div class="col-md-12 mb-4"> |
|
|
|
|
<div class="form-group"> |
|
|
|
|
<label for="exampleFormControlTextarea1">Enquiry</label> |
|
|
|
|
<textarea class="form-control" name = "message" id="exampleFormControlTextarea1" placeholder="Your enquiries.." rows="5"></textarea> |
|
|
|
|
</div> |
|
|
|
|
<span class="error" id='contact-message-error'></span> |
|
|
|
|
</div> |
|
|
|
|
<div class="text-center"> |
|
|
|
|
<button type="submit" class="">Submit your enquiry</button> |
|
|
|
@ -110,6 +115,40 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
// contact us form error declaration |
|
|
|
|
fnameError = document.getElementById('contact-fname-error'); |
|
|
|
|
emailError = document.getElementById('contact-email-error'); |
|
|
|
|
phoneError = document.getElementById('contact-phone-error'); |
|
|
|
|
nationalityError = document.getElementById('contact-nationality-error'); |
|
|
|
|
messageError = document.getElementById('contact-message-error'); |
|
|
|
|
|
|
|
|
|
function contactFullname(){ |
|
|
|
|
var fullname = document.getElementById('contact-fullname').value; |
|
|
|
|
if(fullname.length == 0){ |
|
|
|
|
$('#contact-fullname').focus(); |
|
|
|
|
fnameError.innerHTML = "Full name is required !"; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
fnameError.innerHTML = ''; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function validateContact(){ |
|
|
|
|
if(!contactFullname()){ |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
else{ |
|
|
|
|
Swal.fire( |
|
|
|
|
'Good job!', |
|
|
|
|
'You clicked the button!', |
|
|
|
|
'success' |
|
|
|
|
) |
|
|
|
|
// $('#contactModal').modal('show'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var php_var = "<?php echo $msg; ?>";
|
|
|
|
|
|
|
|
|
|