CMS Development

EliseF
Member

Unable to Pass Field Value to URL Parameter

SOLVE

Hello!

Here is my situation: I have two Hubspot forms, both on Hubspot pages. Upon submission of the first form, it redirects to the second form, and I am looking to auto-populate a field of the second form with the value from the "email" field entered on the first form. I have followed the steps for creating dynamic query strings with personalization tokens outlined here in the knowledge base, however it is not working quite right. Submitting the first form does redirect to the second form, but instead of appending the value from the email field to the URL and auto-populating the field value, it is appending "&submissionGuid=" followed by a string of characters to the URL, and leaving the target field on the second form empty.
This is my first time attempting something like this with Hubspot forms, so any pointers and help would be greatly appreciated!

0 Upvotes
1 Accepted solution
EliseF
Solution
Member

Unable to Pass Field Value to URL Parameter

SOLVE

I found the solution to the problem, so I'll share it here in case anyone else is as confused as I was! 

I realized that I was getting an error in the console log that read " Couldn't find target container #hbspt-form-xxx undefined for HubSpot Form xxx. Not rendering form onto the page." By searching this error, I came across this solution which explained that the form was being embedded as an iFrame since I was using default form styles. By toggling the unstyled form option in the forms page, I could embed the form as raw html, allowing me to successfully access the fields through JavaScript. 

Hope this can help someone else!

View solution in original post

2 Replies 2
EliseF
Solution
Member

Unable to Pass Field Value to URL Parameter

SOLVE

I found the solution to the problem, so I'll share it here in case anyone else is as confused as I was! 

I realized that I was getting an error in the console log that read " Couldn't find target container #hbspt-form-xxx undefined for HubSpot Form xxx. Not rendering form onto the page." By searching this error, I came across this solution which explained that the form was being embedded as an iFrame since I was using default form styles. By toggling the unstyled form option in the forms page, I could embed the form as raw html, allowing me to successfully access the fields through JavaScript. 

Hope this can help someone else!

jennysowyrda
Community Manager
Community Manager

Unable to Pass Field Value to URL Parameter

SOLVE

Thanks for sharing @EliseF!