# Using form to add rows in HubDB table

**URL:** <https://community.hubspot.com/t/using-form-to-add-rows-in-hubdb-table/70227>\
**Category:** CMS Development\
**Created:** [November 30, 2022, 8:58am UTC](https://community.hubspot.com/t/using-form-to-add-rows-in-hubdb-table/70227 "2022-11-30T08:58:20Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Anton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/anton/32/103167_2.png) [@Anton](https://community.hubspot.com/u/Anton)\
**Post date:** [November 30, 2022, 2:56pm UTC](https://community.hubspot.com/t/using-form-to-add-rows-in-hubdb-table/70227/2 "2022-11-30T14:56:25Z")

</div>

Hi @codenil,

you can create a custom module with a modified form embed code like this one

```lia-code-sample
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"></script>
<script>
 hbspt.forms.create({
 region: "na1",
 portalId: "{{ hub_id }}",
 formId: "{{ module.form_field.form_id }}",
			{# all further modifications come here #}
 });
</script>

```

add a form function to it (in this example I did not modify the name) and trigger the [HubDB API](https://developers.hubspot.com/docs/api/cms/hubdb) on an “onFormSubmitted” event

hope this helps.

btw - you can create [multilevel dynamic pages](https://developers.hubspot.com/docs/cms/guides/dynamic-pages/hubdb/multilevel)(listing, detail…) with HubDB

best,

Anton

---

_[View the full topic](https://community.hubspot.com/t/using-form-to-add-rows-in-hubdb-table/70227)._
