We have several forms up and running. Today we noticed that forms submitted on Safari (iOS or Mac) do not create the contact in our CRM. They redirect the user to the next page just fine, but the contact is never created.
We have had lots of contacts and tests come from Safari in the past so this seems to be a recent issue.
We have tested on other browsers and it works just fine.
When this runs the custom script within your page is using the JavaScript "window.location" object which changes the url of the page. This runs when the "onFormSubmit" function runs. From the doc linked:
"Callback that executes after form is validated, just before the data is actually sent. "
This means that it's possible for the custom code in here to run and change the URL of the page before our form actually has the opportunity to submit the data to us. It sounds like safari is likely constantly running this prior to the submission happening.
You may need to consult your developer who customised this embed code to review this and ensure that no changes to this will affect any integrations or your page in unexpected ways. However, I'd recomend changing the "onFormSubmit" function to "onFormSubmitted" as outlined in this doc:
"onFormSubmitted" is similar to the callback you have however the important disctinction is that this runs *after* the form has submit data to HubSpot and not before. This would ensure all of your submissions are entered to HubSpot without issue before your custom code is run.
Hi, I too have an issue with mobile Safari - it seems to be the only browser I have tested that does not submit contacts in to our Hubspot account. Can anyone help as I imagine this browser will be one of the main ones being used when people visit our website initially: http://posar.io/
When this runs the custom script within your page is using the JavaScript "window.location" object which changes the url of the page. This runs when the "onFormSubmit" function runs. From the doc linked:
"Callback that executes after form is validated, just before the data is actually sent. "
This means that it's possible for the custom code in here to run and change the URL of the page before our form actually has the opportunity to submit the data to us. It sounds like safari is likely constantly running this prior to the submission happening.
You may need to consult your developer who customised this embed code to review this and ensure that no changes to this will affect any integrations or your page in unexpected ways. However, I'd recomend changing the "onFormSubmit" function to "onFormSubmitted" as outlined in this doc:
"onFormSubmitted" is similar to the callback you have however the important disctinction is that this runs *after* the form has submit data to HubSpot and not before. This would ensure all of your submissions are entered to HubSpot without issue before your custom code is run.