Send a form after e.preventDefault() - FormIT

Hello, I’m working in a client project that is using FormIt to build and send the form and Foundation Abide to validate it.

I’m need to use e.preventDefault(); (jQuery) when the user click on send to validate some hidden fields but once the validation pass how can I continue the sending process?

Any guide will be welcome, thanks!.

put your conditions in an if statement and I’d they pass just fire submit().

Mate, thanks for your answer.
well, I tried before I make this post:

$("#formid").submit();

din’t work, and

$("#formid")[0].submit();

didn’t work neither… no idea what is wrong.
any other idea?, thanks mate!

I was trying to stop the sibmit then check a condition:

e.preventDefault();
if ( 1 < 0 ) {
alert(“it’s false”);
} else {
//can’t send if is true.
}

So, to solve this problem what I did is move the preventDefault inside the conditional and run it only if the condition is false, eg:

if ( 1 < 0 ) {
e.preventDefault();
alert(“it’s false”);
} else {
//Now it send the email.
}

Sounds stupid but hope it save some time to somebody else.
Thanks!

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.