Basically I am trying to create a JQuery script that would return true or false when a submit button on a form is clicked. so basically in this case if the form is not completed and the person clicks the submit form they receive the following text message. (“There was a problem with your submission. Errors have been highlighted below.”)
The URL is http://atlanticbay.com/amieecarr/. The form and submit button is at bottom of page.
Please review code on site page. HTML to long to post here.
Here is the JQuery script I tried.
$('.gform_footer').click(function() {
var gForm = $(this).parents(':contains("There was a problem with your submission. Errors have been highlighted below.")');
if (gForm.length) {
// Do something here
return true;
} else {
// Don't follow the link
return false;
}
});
I am using this as a part of a custom script for Adobe Analytics to capture the event when a visitor submit a form. What I really want is to capture when it is a completed form, the message above comes when its submitted but the form is not complete. so I figure I could make adjustment to code once I am able to capture the event as true when the form is incomplete.