Lead Capture Tools

JVPV
Participant

Multiple-checkbox field type submissions not working correctly in Non-Hubspot Form

SOLVE

Hello, 

I am having an issue with form submissions:

I have Embeded Hubspot Form set up with an Email and Multiple checkboxes field types. The actual form lives in the website as a non-Hubspot form, but my submissions for this form's checkboxes are coming in as "Not Checked" or "Checked" instead of the actual data. 

On the other hand, the published embeded Hubspot form that connects to the non-hubspot form does receive the correct correct data for the checked inputs.  Why does this form receive it correctly and the non-hubspot form gets "Checked" or "Not Checked"?

When users select the checkboxes they want, it generates and array with these values, but to parse the submission data correctly so Hubspot can receive it I am joining the array with semicolons as recommended. 

So the submitted fromatted data paylaod looks like this when all checkboxe inputs are checked:

[
  {
   name: "email",
   value: "test@example.com"
  },
  {
   name: "briefing_subscriptions",
   value: "research-and-analysis;daily-threat-briefing;weekly-threat-briefing;monthly-threat-briefing"
  }
]


Non-Hubspot Form when all checkboxes are checked:
Non Hub  Checked.png

Hubspot Form when all checkboxes are checked:
Hub All Checked.png

Non-Hubspot Form when all checkboxes are NOT checked:
Non Hub Not Checked.png

Hubspot Form when all checkboxes are NOT checked:
Hub Not All Checked.png

Any help or clues would be greatly appreciated!

0 Upvotes
1 Accepted solution
franksteiner79
Solution
Recognized Expert

Multiple-checkbox field type submissions not working correctly in Non-Hubspot Form

SOLVE

Hi @JVPV 

 

Based on the article I shared, "All data submitted to non-HubSpot form fields will only match to single-line text field type properties in HubSpot. Non-HubSpot form fields cannot match with other field types."

 

So looks like API form submissions call is the way to go for you in this case. I would also recommend including the hutk token in your API call in order to capture traffic source information - this relates to yellow cookie warning you are seeing in the form submissions.

 

Frank

Found my comment helpful? Great! Please mark it as a solution to help other community users.


Frank Steiner

Marketeer | HubSpot Expert | CRM Consultant

InboundPro

Let's Talk About Your Project

View solution in original post

3 Replies 3
franksteiner79
Recognized Expert

Multiple-checkbox field type submissions not working correctly in Non-Hubspot Form

SOLVE

Hi @JVPV 

 

Are you by any chance sending both the non-HubSpot and HubSpot form submissions via API calls, the orange/yellow boxes on the form submission make me think you do.

 

So my next question is why?

 

To collect non-HubSpot form submissions a few requirements need to be met and this feature does not require you to run API calls. Same goes for HubSpot forms, once created and embedded all that is required is the HubSpot tracking code needs to be installed on the site/page you are embedding the HubSpot form.

 

Can we maybe take 2 steps back and you explain what it is you are trying to do and why?

 

Cheers

Frank

Found my comment helpful? Great! Please mark it as a solution to help other community users.


Frank Steiner

Marketeer | HubSpot Expert | CRM Consultant

InboundPro

Let's Talk About Your Project
JVPV
Participant

Multiple-checkbox field type submissions not working correctly in Non-Hubspot Form

SOLVE

Hello @franksteiner79 

Yes, I was experiencing issues with just the tracking code, which is why I'm submitting via both the API and using the tracking code. I was trying to understand why I only received "Checked" or "Not Checked" values when using the tracking code, instead of the actual selected checkbox values.

I then tried the API route to see if the checkbox submission values would arrive in HubSpot correctly. This required creating a form in HubSpot with the same inputs, mapping their IDs to form inputs in my code, and sending the submission via a POST request to the API endpoint. This ended up working, but what confuses me is why it works with the API but not with the tracking code. I am not sure what I am doing wrong for the tracking code not to work correctly. Could it be how I set up my form input checkboxes and their ID's?

When I use only the tracking code, I get "Checked" or "Not Checked."
When I use only the POST request to "https://api.hsforms.com/submissions/v3/integration/submit/:portalId/:formGuid," I get the actual values for the selected checkboxes.

I was testing both approaches to see how I could get the Threat Briefings data properly. For now, I can only receive the data for this non-hibspot form via API and not the tracking code.

I apprectiate your response. Let me know if you have any doubts or would like to see some code.

Thank you,

John

0 Upvotes
franksteiner79
Solution
Recognized Expert

Multiple-checkbox field type submissions not working correctly in Non-Hubspot Form

SOLVE

Hi @JVPV 

 

Based on the article I shared, "All data submitted to non-HubSpot form fields will only match to single-line text field type properties in HubSpot. Non-HubSpot form fields cannot match with other field types."

 

So looks like API form submissions call is the way to go for you in this case. I would also recommend including the hutk token in your API call in order to capture traffic source information - this relates to yellow cookie warning you are seeing in the form submissions.

 

Frank

Found my comment helpful? Great! Please mark it as a solution to help other community users.


Frank Steiner

Marketeer | HubSpot Expert | CRM Consultant

InboundPro

Let's Talk About Your Project