# Creating form with custom submit action

**URL:** <https://community.hubspot.com/t/creating-form-with-custom-submit-action/25741>\
**Category:** CMS Development\
**Created:** [September 21, 2020, 9:27pm UTC](https://community.hubspot.com/t/creating-form-with-custom-submit-action/25741 "2020-09-21T21:27:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrswiss](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mrswiss/32/38459_2.png) [@mrswiss](https://community.hubspot.com/u/mrswiss)\
**Post date:** [September 21, 2020, 9:27pm UTC](https://community.hubspot.com/t/creating-form-with-custom-submit-action/25741/1 "2020-09-21T21:27:16Z")

</div>

Hello,

I’m trying to create a custom form module that sends a post to another api during submissions. The goal being that I can build the form once, and the marketers can make the different landing pages that utilize it. I’ve made a form via the ‘Marketing → Lead Capture → Forms’ tool, but am unsure how to change the submit button code to also do the post api in addition to what happens normally. What knowledge am I missing here? I’ve looked at the below resources that were recommended, but it’s not clicking so to speak.

- [https://community.hubspot.com/t5/CMS-Development/Execute-Form-Submit-Button-with-custom-HTML-Button/m-p/341032](https://community.hubspot.com/t5/CMS-Development/Execute-Form-Submit-Button-with-custom-HTML-Button/m-p/341032)
- [https://community.hubspot.com/t5/CMS-Development/Getting-field-value-on-form-submit/m-p/326508](https://community.hubspot.com/t5/CMS-Development/Getting-field-value-on-form-submit/m-p/326508)
- [HubSpot forms - HubSpot docs](https://designers.hubspot.com/how-to-create-a-form-module-in-a-custom-module)

---

<div class="post-metadata">

**Author:** ![mrswiss](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/mrswiss/32/38459_2.png) [@mrswiss](https://community.hubspot.com/u/mrswiss)\
**Post date:** [September 21, 2020, 9:47pm UTC](https://community.hubspot.com/t/creating-form-with-custom-submit-action/25741/2 "2020-09-21T21:47:07Z")

</div>

Literally clicked right after I posted this. My solution was taking the ‘embed’ code that is part of the form I made, then literally pasting it in the ‘html+hubl’ portion of a new custom module.

From there, the links I mentioned earlier helped in the after steps, specifically the ‘onFormSubmitted’ post event.
