APIs & Integrations

tif_nee
Participante | Partner nivel Gold
Participante | Partner nivel Gold

Prefill a hidden field from the embedded form code on an external website

Hi all,

 

I have a form embedded on an external website and would like to set a variable/hidden field on form submission. I have a custom field already setup for a contact. In short, upon submission I want this field prefilled by a variable I'm setting at the embed code. The embed code is static so I'll be able to add the variable per instance. Basically I want to create my own version of the pageID variable used internally on HS landing pages.  Any ideas how I can accomplish this?

 

Thank you!

2 Respuestas 2
mii
Colaborador | Partner nivel Platinum
Colaborador | Partner nivel Platinum

Prefill a hidden field from the embedded form code on an external website

@Jaycee_Lewis Same here...

...external Page and Form submit without hidden fields. As well as trouble with prefilled visible fields on external pages. This time Wordpress. Any easy HubSpot or JavaScript solution, that dosen't require a full API implementation is welcome.

@hubspot I don't see any reason why hidden fields should be blocked for external pages?! You don't expect that. And it is nowhere documented. It is definitely an exclusion criterion against using hubspot.

Possible Solution: Make sure Form is set to unstyled HTML on external page, otherwise it's an iFrame and can't be prefilled with JavaScript.

0 Me gusta
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

Prefill a hidden field from the embedded form code on an external website

Hi, @tif_nee 👋 Thanks for the interesting question!

 

Hey, @DanielSanchez @Gonzalo @Mark_Ryba do you have any insight or thoughts on how @tif_nee can approach this challenge?

 

Thank you very much! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Me gusta