Creating form with custom submit action

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.

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.