Insert HubDB value into Hidden Form Field

Would like to insert a HubDB value into a Hidden Form field. Will this work?

For example - insert the following in Default item on hidden field.

{{ dynamic_page_hubdb_row.webinarID }}

Use Case:

  • Enable use of a single form on all webinar event Dynamic pages
  • Capture Webinar ID in hidden form field as Contact Property
  • Use Contact Property:Webinar ID in a workflow that uses Webinar ID Personalization token in action that add contact to Zoom Webinar

Other ideas/thoughts welcome as well.

Hi, @DBoroi5 :waving_hand: Thanks for the interesting question. Hey, @Anton @Teun @derekcavaliero have you tackled anything like this in your project work?

Thanks for taking a look! — Jaycee

I’ve never done it, but it might be possible if you build a custom form module and implement the hubspot form embed javascript manually (don’t use the native output of the Form module field). Reason being is that you can’t tell native hubspot form modules (or field types) to set default values for particular form fields (but you can do that via the form javascript callbacks using onFormReady).
The limitation here might be where you can use HubDB (I do think you can use HubDB tables in custom modules - but again - I haven’t had this need personally so this is all theory).

The other (more hacky option) would be to attempt to use the global callbacks inside the page where the form is embedded and prefill that way. I prefer to contain stuff like this to modules whenever possible rather than hacky global overrides but some restrictions in the HubSpot CMS unfortunately require hacky global workarounds.

Thanks @Jaycee_Lewis . I did see this related post which may solve: https://community.hubspot.com/t5/CMS-Development/Set-Form-Field-Value-with-HubL/m-p/363275#M18203

However, I had difficulty getting it to work per my comment on that thread.