APIs & Integrations

BorjaInbound
Participant

Pass field value to URL parameter

SOLVE

Hello!

So basically, we’ve built custom private pages for our client’s customers. The thing is that there are many customers groups/segments and we created one private page per group.

So, in order to join these pages, the users must fill out a form inside HubSpot and one of the form fields is called “Security Token”, a single-line text field.

Depending on the group they belong to, the customers will enter a different “Security Token”, with this “token”, we identify the segment where they belong to.

So, for internal purposes, we need to pass the “Security Token” field value into a string parameter in the URL of the page that they’re redirected.

An example:

  1. The user fills out the form (COS Page and HubSpot form), and its token is “TOKEN101”
  2. Form is submitted and it’s redirected to the desination page.
  3. The destination page URL should be “www.example.com/destination-page?token=token101

Is there any way to achieve this? Maybe using Forms API?

Thanks in advance for your time :slight_smile:

1 Accepted solution
Oscar1
Solution
Top Contributor

Pass field value to URL parameter

SOLVE

We needed to pre-fill some hidden fields from a form based on a URL from a CTA we send in an e-mail. This is the way that works for us:

 

https://example.com?email={{ personalization_token("contact.email", "Add here default value") }}

 

And you can add as many parameters as you'd like. Notice that if it's a company or deal property you'll have to change "contact.email" for "company.name" for instance or "deal.deal_amount".

 

Hope that works for you.

View solution in original post

21 Replies 21
Samantha_Alford
Top Contributor

Pass field value to URL parameter

SOLVE

Hey @Borja_InboundLead,

did you end up working out how to do this? I have the same challenge.

Thanks in advance,
Sam


Samantha Alford
Did my post solve the issue? If so, please accept it as a solution!