It should not be within <div class="product-essential"> because inside it you have a form for adding to cart. You have two options here:
- To move out contact form outside of <div class="product-essential"> and adjust it via CSS for different viewports and devices
- To implement javascript solution which will took all details from field and send it asynchronously via ajax, something like:
<script type="text/javascript">
function callAjax() {
jQuery.ajax({
type: "POST",
url: "<?php echo Mage::getUrl('contacts/index/post') ?>",
dataType: "json",
data: {email: mail},
success: function (exists) {
if (exists == 0) {
// js for fail, hide disable button etc etc
} else if (exists == 1) {
// js for success bits
}
},
error: function (jqXHR, textStatus, errorThrown) {
// error handling
}
});
}
</script>
And just add event observer "onclick" for Submit button in order to start processing.
If this response was helpful to you, consider giving kudos to this post.
If this response solved your problem, click accept as solution to help others solve this issue