Passing a Hidden Field Through a Hubspot Form

By Forrest Smith -

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):
      region: "na1",
      portalId: "12345678",
      formId: "12345678",
      onFormReady: function($form){