Pass field value to URL parameter

Occasional Contributor


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 “

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

Thanks in advance for your time :slight_smile:

5 Replies 5
Top Contributor

Hey @Borja_InboundLead,

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

Thanks in advance,

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

Would love to know if there is a solution to this yet?

New Member

According to this API endpoint documentation you must use content-type:application/x-www-form-urlencoded, so you ll lost your redirect link’s get parameters. But you can analyze your token before cURL call and/or use some service link like<your_token> with redirect to

Community Manager

Hi all,

Regarding the original question; if you were to use a custom HTML form and the forms API, you could redirect the visitor to any URL with whatever query parameters you’d like. You could also customize the form embed code to dynamically change the redirectUrl to include query parameters, as previously discussed on the forums:

Top Contributor

If the form is on a COS page, then i think it is easier than you think (you won't even have to do anything api related)

  1. Go to edit the form module

  2. Even if you are going to an internal page, click redirect to external URL

  3. redirect to your desired page and attach whatever contact property you desire via query parameters.{{contact.your_internal_property_name}}

After you click save, you can see your link when you hover over test link