# Do something with Campaign Web Form before POST submission to infusionsoft

**URL:** <https://integration.keap.com/t/do-something-with-campaign-web-form-before-post-submission-to-infusionsoft/78775>\
**Category:** API Q&A\
**Created:** [July 30, 2020, 1:34am UTC](https://integration.keap.com/t/do-something-with-campaign-web-form-before-post-submission-to-infusionsoft/78775 "2020-07-30T01:34:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Brandon\_Colton](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brandon\_Colton](https://integration.keap.com/u/Brandon_Colton)\
**Post date:** [July 30, 2020, 2:41am UTC](https://integration.keap.com/t/do-something-with-campaign-web-form-before-post-submission-to-infusionsoft/78775/3 "2020-07-30T02:41:10Z")

</div>

Okay, sometimes I just have to ask myself the right question to figure something out. I’m still learning. Apparently, onSubmit in the form tag will supersede the POST. I have only ever handled form submits through jquery before so this feels pretty elementary.

Hopefully my errors will show somebody else the way.

Solution is to add **onSubmit=“return validateInfusionForm()”** to your form tag.

```
function validateInfusionForm()
{
	let infusionForm = $('.infusion-form');
	infusionForm.form({
		fields: {
            'inf_field_FirstName': 'empty',
            'inf_field_Email': 'empty',
        },
	});
	
	if (infusionForm.form('is valid')) {
		return true;
    } else {
        infusionForm.form('validate form');
		return false;
    }
}

```

---

_[View the full topic](https://integration.keap.com/t/do-something-with-campaign-web-form-before-post-submission-to-infusionsoft/78775)._
