Umbraco Forms and Hubspot recording form submissions
Hi
I have a client using a mixture on Umbraco Forms and normal forms using a Surface Controller.
The forms using a Surface Controller record the form submissions with no problem within HubSpot.
However they use a number of Umbraco Forms throughout the site and these forms are not being recorded by HubSpot.
Hubspot state if any javascript is binded to the form submission button it could potentially not record the form submission and their subsequent values.
There are a few other reasons why it would not record the form submission below:
Form not enclosed in
Form has JavaScript bound to form submit event or submit button click
event. This is how the tool captures submissions and any other events
can prevent HubSpot from knowing when submissions occur
Form was introduced after the page completed loading. The tool
scans the page as soon as it loads and listens to submissions on
forms that were present at that point.
Form contained a sensitive field, such as credit card number.
Could any of the above cause HubSpot not to record the submission?
Has anyone used HubSpot to record Umbraco Forms form submissions.
Are the reasons you mention above applicable to your site, or are they just suggested reasons on why it won't work?
I know for example that there is custom JS code that handles the form submission, so that could be a valid reason on why the Hubspot 'event' doesn't get triggered.
You will probably notice a file called umbracoforms.js that gets loaded on the page containing the Umbraco Form. In there there is a click event handler for the form submit button. It does call event.preventDefault() in there, so that could be a reason why Hubspot's JS (I assume?) does not get triggered.
These are suggested reason from Hubspot as to why the form submission may not be recorded.
If there is custom trigger javascript code on the form submissions then I think this must be why the form submissions are not being recorded via Hubspot.
Other forms throughout the site that don't use Umbraco Forms but just use standard vanilla SurfaceControllers are recorded fine by Hubspot. So it has to be something akin to javascript being binded to the form submission.
I dont think there is any around it. The client likes the ability to generate form wysiwyg style and add to pages as they see fit. Creating the forms with standard forms and SurfaceControllers will take away that for them.
I assume removing the javascript from Umbraco Forms will cause unexpected results, not a road I want to go down as I think this will just cause head ache after head ache.
Have you considered creating a custom workflow that can be executed when the Umbraco Form has been submitted, which then submits the form entry to Hubspot via their API?
Umbraco Forms and Hubspot recording form submissions
Hi
I have a client using a mixture on Umbraco Forms and normal forms using a Surface Controller.
The forms using a Surface Controller record the form submissions with no problem within HubSpot.
However they use a number of Umbraco Forms throughout the site and these forms are not being recorded by HubSpot.
Hubspot state if any javascript is binded to the form submission button it could potentially not record the form submission and their subsequent values.
There are a few other reasons why it would not record the form submission below:
Form not enclosed in
Form has JavaScript bound to form submit event or submit button click event. This is how the tool captures submissions and any other events can prevent HubSpot from knowing when submissions occur
Form was introduced after the page completed loading. The tool scans the page as soon as it loads and listens to submissions on forms that were present at that point.
Form contained a sensitive field, such as credit card number.
Could any of the above cause HubSpot not to record the submission?
Has anyone used HubSpot to record Umbraco Forms form submissions.
Are the reasons you mention above applicable to your site, or are they just suggested reasons on why it won't work?
I know for example that there is custom JS code that handles the form submission, so that could be a valid reason on why the Hubspot 'event' doesn't get triggered.
You will probably notice a file called
umbracoforms.js
that gets loaded on the page containing the Umbraco Form. In there there is aclick
event handler for the form submit button. It does callevent.preventDefault()
in there, so that could be a reason why Hubspot's JS (I assume?) does not get triggered.Hi Tom
These are suggested reason from Hubspot as to why the form submission may not be recorded.
If there is custom trigger javascript code on the form submissions then I think this must be why the form submissions are not being recorded via Hubspot.
Other forms throughout the site that don't use Umbraco Forms but just use standard vanilla SurfaceControllers are recorded fine by Hubspot. So it has to be something akin to javascript being binded to the form submission.
I dont think there is any around it. The client likes the ability to generate form wysiwyg style and add to pages as they see fit. Creating the forms with standard forms and SurfaceControllers will take away that for them.
I assume removing the javascript from Umbraco Forms will cause unexpected results, not a road I want to go down as I think this will just cause head ache after head ache.
Hi Neil,
Have you considered creating a custom workflow that can be executed when the Umbraco Form has been submitted, which then submits the form entry to Hubspot via their API?
Ah ha now that looks promising!!
This would still give them the ability to use Umbraco Forms and save me re-writing all the forms.
I shall look into it. Thank you!
This is exactly what I did.
You can post the values via a workflow.
Easy to do, and more clean. Just requires a bit more work to set up
is working on a reply...