Ignore Forms API if the contact email is part of the Hubspot role "Team"


#1

Hi,

I'm using this PHP code to send data to one of our Hubspot Forms: https://developers.hubspot.com/docs/methods/forms/submit_form

Sometimes team members (identified by hubspot role "Team") submit this form in which case we don't want their data to be submitted/updated in Hubspot. How would I identify if the contact is part of the team before submitting the data?

Thank you


#2

Hi @catalin.oanca,

That depends; in general, there aren't and server side validation options for form submissions that come in via the API. It's up to you to do client side validation; in this case, that means preventing members of your team from submitting the form. How exactly you do this depends on your implementation; maybe you check the email field, or use some other criteria to prevent the submission.