CMS Development

hd-hs
Teilnehmer/-in

Swapping form on landing page with HubDB

lösung
I am using HubDB to pull dynamic content into a single landing page. However, I need to change the form that is loaded on this page based on the URL with the rest of content coming from HubDB.

Does anyone know of a solution to this? I don’t want to create 5 different landing pages just for a form.
0 Upvotes
1 Akzeptierte Lösung
hd-hs
Lösung
Teilnehmer/-in

Swapping form on landing page with HubDB

lösung

Thanks! Solved this in the end by creating a custom hubspot property and adding this property as a hidden field in the form. You can then pass the property into the url and this will populate the hidden fields data.

e.g. example.com?internal_property_name_here=test

https://knowledge.hubspot.com/forms/can-i-auto-populate-form-fields-through-a-query-string

Lösung in ursprünglichem Beitrag anzeigen

4 Antworten
Kevin-C
Trendsetter/-in | Partner
Trendsetter/-in | Partner

Swapping form on landing page with HubDB

lösung

Hey @hd-hs 

 

Might you be able to create multiple forms, add a column in your DB with the corresponding form ID, and use hubl to place it into the page. This way the form wouldn't necessarily be based on the URL/query-string but rather data from the DB.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
hd-hs
Lösung
Teilnehmer/-in

Swapping form on landing page with HubDB

lösung

Thanks! Solved this in the end by creating a custom hubspot property and adding this property as a hidden field in the form. You can then pass the property into the url and this will populate the hidden fields data.

e.g. example.com?internal_property_name_here=test

https://knowledge.hubspot.com/forms/can-i-auto-populate-form-fields-through-a-query-string

Kevin-C
Trendsetter/-in | Partner
Trendsetter/-in | Partner

Swapping form on landing page with HubDB

lösung

Edge case alert:

What happens if the user manually types in the URL and forgoes the querystring?

 

Have you got a fallback in place?

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
hd-hs
Teilnehmer/-in

Swapping form on landing page with HubDB

lösung
These URLS are coming from PPC ads and therefore set from my side. Sorry, should have said! If they remove the query string later down the line I am not too worried as I am only interested in direct traffic from the ads at the moment!