I’m trying to check via the API if a form has already been submitted by a visitor.
I see the UTK value in the cookies and see that I can retrieve a VID value from the API using that.
I’ve also got the Hubspot Form ID value.
It seems like with those two values I should be able to check if the visitor has already filled out a given form but I’m having a bit of a trouble. Anyone able to point me in the right direction?
Hey @dennisedson. I actually figured this out pretty easily.
The values returned when you get a contact by their token include appears to include form submissions if any exist. So the one API query is all that’s really needed.
If there’s no form submissions then they didn’t submit the form. If there are you then you can loop through them easily enough and see if the form id values match up.