Hi, I’m creating a calculator with Unbounce (at least trying to) thing is, I need to do some validations before the data is submitted as a lead, but when I click the CTA it is automatically submitting the form, so what I did was to unbind the click of the CTA and then use the preventDefault function.
My mission is to do all the validations I need and then when all the validations are clear, to submit the data to unbounce as a lead. Here’s the code.
$(document).ready(function(){
var id=window.module.lp.form.data.formButtonId;
// deletes unbounce-added submit function:
lp.jQuery(’#lp-pom-button-17’).unbind(‘click’);
lp.jQuery(’#lp-pom-button-17’).click(function(e) {
e.preventDefault();
e.stopPropagation();
//HERE GOES ALL MY VALIDATIONS
});
My question is, how can I “re-submit” the landing page form, I’m using
$(’#lp-pom-form-16 form’).unbind(‘submit’).submit();
But it’s not working.
Also tried simply
$(’#lp-pom-form-16 form’).submit();
And still nothing.