Automatically populate/pass hidden form fields

Use case: Free Service offering, if users click on a premium feature we want to pop a HubSpot landing page as an iframe with a CTA if interested in upgrading.

Since they are already logged into our service before they click on anything, I’d like to automatically populate/pass their email address ideally so there is no form fields to complete.

Screenshot 2022-01-31 174618.png

If they click on the CTA above it will display “Thanks, someone will contact you shortly.”

Then I’ll proceed with internal notification and other workflow actions.

So, how can we inject the user’s email address into the iframe/CTA button?

Thanks!

I would highly recommend against using iframes. It’s a bad experience for the user to start along with other tracking issues that could arise. If you already have a dev team who manages this platform for your organization, you could just ask them to place a button anywhere on your app/service and then let them post through the Hubspot API directly to your form. The user is already captured within the system and the repost to Hubspot could be done cleanly without taking the user out of the flow of what they are doing in your system. https://legacydocs.hubspot.com/docs/methods/forms/submit_form

Hi!

I agree with @Ben_M, I would advise against using an iframe. I guess I’m not seeing why you would need one, but we have limited information here.

At any rate, one solution to pass the information to your team would be to use query parameters in your URL.

Generic button link: https://www.example.com

Query Parameters link: Example Domain

ITEM

&name=ITEM

Two important things to note:

  1. The bolded ITEMs above are where you’d put in the unique user information. If you have a user ID, that could be one way to create a nice clean link. The query parameters “email” and “name” can be interchanged, added, removed, etc. It’s a choose your own adventure style where you can makeup whatever you want. You can also add these custom parameters to Google Analytics for data tracking.
  2. You cannot use query parameters with HubSpot CTAs. CTAs are intended to be unique to particular offers, not unique to particular users. So that is something to weigh in while looking at options.

Another option if you don’t want to use a button - You could create a form with all hidden fields for the contact properties you want… so the user would only see the “submit” button but on your end you’d see all the fields.

Hope this helps!

Alicia

(edited for clarity)

@A-Cardenas - thanks for this! My original preference was to use a form with hidden fields, so I like this solution.

I’m assuming I can auto populate/submit Company fields as well as Contact fields?