Help center
Go to home
Go to templates
Go to settings
Go to help center

Populate hidden fields with Hubspot

Add HubSpot personalization tokens to a form link in a HubSpot email so each contact's CRM data fills the form's hidden fields.

HubSpot personalization tokens show each contact their own data, drawn from the properties on their CRM record. Put a token into a form's link inside a HubSpot email and every contact gets a link that carries their own details.

On the form's side that link is read by a hidden field: a named slot a form made with Tinyform fills from its URL's query string, invisible to the visitor and stored with the submission.

Hidden fields exist to carry what you already know about a person into the form, so you do not have to ask for it again.

1. Create a form

Open the editor at /forms/<id>/edit, type /hidden and insert a Hidden fields block. Each row is named after the query parameter it reads. For this example add email and source.

Press Publish, open the Share tab and copy the share link, which is the published form at /r/<id>.

2. Create a HubSpot campaign

A personalization token in HubSpot resolves to a contact property, such as the email address, so it can pass that value into the form through the link.

HubSpot's CTA buttons may not accept a personalization token in their link. If yours does not, place a linked image where the button would go and put the token in the image's link instead.

Copy the token from the email's raw HTML, then paste it into the form link's parameter.

Screenshot
The first parameter follows a ?; every further one is joined with &. For example: /r/<id>?email={{ contact.email }}&source=email

The hidden field email is paired with the token, so it receives each contact's address, and source gets the fixed word email, because everyone reaching the form through this email came from it. The token syntax is HubSpot's; the form only reads whatever ends up after the =.

The parameter's name must match the row's name exactly, including case.

3. Launch the campaign

When HubSpot sends the email it resolves the token in every copy, so each contact's link carries their own value. On submit the form stores it with the answers, and it appears as its own column in the Submissions tab and the CSV export, headed by the row's name.

A hidden field can be quoted in the form's wording: type @ and choose the row under Mention a hidden field, and give the mention a Default value for a visitor who arrives without the parameter. It can also pre-fill an answer. See How to mention hidden fields in your form.