# Insert HubDB value into Hidden Form Field

**URL:** <https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [January 10, 2023, 3:52pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562 "2023-01-10T15:52:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBoroi5](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DBoroi5](https://community.hubspot.com/u/DBoroi5)\
**Post date:** [January 10, 2023, 3:52pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562/1 "2023-01-10T15:52:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 11, 2023, 5:32pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562/2 "2023-01-11T17:32:05Z")

</div>

Hi, @DBoroi5 👋 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

---

<div class="post-metadata">

**Author:** ![derekcavaliero](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derekcavaliero/32/24634_2.png) [@derekcavaliero](https://community.hubspot.com/u/derekcavaliero)\
**Post date:** [January 11, 2023, 6:23pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562/3 "2023-01-11T18:23:31Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![derekcavaliero](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derekcavaliero/32/24634_2.png) [@derekcavaliero](https://community.hubspot.com/u/derekcavaliero)\
**Post date:** [January 11, 2023, 6:25pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562/4 "2023-01-11T18:25:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DBoroi5](https://avatars.discourse-cdn.com/v4/letter/d/ed8c4c/32.png) [@DBoroi5](https://community.hubspot.com/u/DBoroi5)\
**Post date:** [January 11, 2023, 5:43pm UTC](https://community.hubspot.com/t/insert-hubdb-value-into-hidden-form-field/72562/5 "2023-01-11T17:43:21Z")

</div>

Thanks [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) . 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](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.
