# UTM Parameters and Hidden Form Fields

**URL:** <https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393>\
**Category:** Lead Capture Tools\
**Tags:** professional\
**Created:** [June 14, 2024, 1:42pm UTC](https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393 "2024-06-14T13:42:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TShannon3](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@TShannon3](https://community.hubspot.com/u/TShannon3)\
**Post date:** [June 14, 2024, 1:42pm UTC](https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393/1 "2024-06-14T13:42:23Z")

</div>

Are utm parameters in a URL the only way to pass data to hidden form fields?

I have a client who has a dynamic event registration flow in Wordpress. A user types in their zip code, is presented with a list of events nearby. Then they select the event they want to attend and are presented with a HubSpot Form for Registration. I need the hidden fields in the form to capture the event location, date, and time that they selected.

I imagine this can be accomplished with utm parameters in the url, but are they other ways--for example using JS--to pass data into a hidden form field?

Thanks!

---

<div class="post-metadata">

**Author:** ![PamCotton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pamcotton/32/47916_2.png) [@PamCotton](https://community.hubspot.com/u/PamCotton)\
**Post date:** [June 14, 2024, 6:11pm UTC](https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393/2 "2024-06-14T18:11:17Z")

</div>

Hey @TShannon3, Happy Friday!

HubSpot allows you to create custom properties (fields) within your form. You can configure these fields to be hidden and then populate them with values using HubSpot’s built-in functionality.

To our top experts, @Anton and \*\*@matthew-aire \*\*any recommendations for \*\*@TShannon3 \*\*matter?

Thank you,

Pam

---

<div class="post-metadata">

**Author:** ![matthew-aire](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/matthew-aire/32/12187_2.png) [@matthew-aire](https://community.hubspot.com/u/matthew-aire)\
**Post date:** [June 16, 2024, 9:18am UTC](https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393/3 "2024-06-16T09:18:49Z")

</div>

Hi @TShannon3

Definitely you can add this via UTMs in a URL. This can also be done using JS, please review this code [here](https://github.com/NeroPN/yas-code/blob/main/utms-to-hubspot-forms-complete.js).

Let me know how it goes!

Many thanks,

| [![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/e/0ed987bea2248c18646a10c8d0b79ef2a13740c7.png)](https://www.linkedin.com/in/matthewaire/) | **Matt Aire**  
HubSpot Freelancer | Founder @ pocketpros  
[Let's chat HubSpot - book a meeting](https://matthewaire.com/meetings/matthew-aire) |

👌 If my reply was useful and helped answer your question, **please mark it as a solution to help the community!**

---

<div class="post-metadata">

**Author:** ![Ahoova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@Ahoova](https://community.hubspot.com/u/Ahoova)\
**Post date:** [August 17, 2025, 10:29am UTC](https://community.hubspot.com/t/utm-parameters-and-hidden-form-fields/109393/4 "2025-08-17T10:29:08Z")

</div>

The link to the code is no longer accessible
