Skip to content
Drempd Logo
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • projects
    • website design
    • code notes
  • contact
Blog Web Dev Passing a Hidden Field Through a Hubspot Form

Passing a Hidden Field Through a Hubspot Form

By Forrest Smith - Drempd.com

A company I work for has many events that they attend and they would like to have a hubspot form gather data for each event, but of course they don't want to make a separate form for each one.

1. Step 1 - Create a Hidden Field on Your Hubspot Form

2. Step 2 - Populate the Form With the Data You Want Via Javascript

Use Javascript to update the value of the hidden form field to whatever you want (and of course the portalId and formId are set to your unique account and form):
<script>
   hbspt.forms.create({
      region: "na1",
      portalId: "12345678",
      formId: "12345678",
      onFormReady: function($form){
         $form.find('input[name="event_name"]').val('Brian').change();
      }
   });
</script>

Posted on June 22, 2022August 28, 2025 in Web Dev

I love to create and explore. Whether building a website or app, taking a long walk through the mountains, or playing with a random idea, I've found that there will never be enough time to experience it all. But that won't stop me from trying.

Web Design & Development

  • Portfolio
  • San Diego Website Design
  • Custom Web Design
  • Responsive Web Design
  • Website Maintenance
  • Freelance Web Designer
  • Web Design Posts
  • Website Checklist

Projects

  • Zindash
  • Opti
  • Saphire CSS
  • Ergo Blocks

Blog

  • Adventure
  • San Diego
  • Projects
  • Website Design
  • Technology
  • Code Notes
  • Stream

About

  • Bluesky
  • Resume
  • Contact
drempd | san diego, ca
© 2026 Drempd All rights reserved.