Hi guys,
I want to do some custom validation work (via ajax) before I will allow a lead to be submitted.
For now, as a proof of concept, I am just trying to stop the form being submitted at all. But I can’t work out how.
This is the code I am using. When you click on the button to submit the lead form, it displays the alert, but then the form is submitted anyway even though propagation of the event should have been stopped.
Please help!
Here is the code I am using:
<script>
$(document).ready(function() {
$('#lp-pom-button-17').click(function (e) { e.preventDefault(); $('#lp-pom-form-16').submit(function() { return false; }); alert("hit"); return false; });
});