Hi, very new to PHP coding and struggling with this. I have several PHP forms on a site that need certain fields that are required, usual stuff, name, email address, etc. The form I used has code included in the head that I believe I needs to be adapted to include this function, but as every form script I look at is slightly different I’ve found taking snippets from another to use to this end just doesn’t work. Any assistance greatly appreciated, many thanks.
Code (I believe) I need to modify:
<script>
$(function(){
$('#towbar-enquiry-form').validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
url: 'process.php',
success: function() {
$('#towbar-enquiry-form').hide();
$('#contact-form').append("<p class='thanks'>Thank you! Your tow bar fitting enquiry has been sent. We will be in touch shortly.</p>")
}
});
}
});
});
</script>