CTA pop up form customisation

Can anyone help me to find a documentation (if any) for form customisation? It was possible to customise
onFormSubmit event in the form embed code with old forms:
https://legacydocs.hubspot.com/docs/methods/forms/advanced_form_options

However I cannot find how to customise new pop up forms:

https://knowledge.hubspot.com/forms/create-pop-up-forms#form

Hey @lstepany this isn’t currently possible. The form embed code you’ve linked isn’t the “old” one, it’s the form embed code. When embedded in a CTA you don’t have access to the form embed code to add the callbacks.

The only way to customise this would be to use your form embed code and create a custom pop-up yourself as CTAs wouldn’t give you access to this.

Thanks for reply @TomM2 !

Check this out! HubSpot <> Google Tag Manager Custom Event · GitHub

Justin forewarded this in the HubSpot’s Slack API channel. It proofed to work pretty wall, I was able access the pop-up form data and to add any function I need :smiling_face_with_sunglasses:

Interesting thanks for sharing @lstepany

Has HubSpot confirmed CTA markup will stay consistent? In the past I’ve seen markup change when it’s not publicly shared, particularly with new products.

That’s avalid point I actually haven’t checked that. Thanks! :slightly_smiling_face: