Include form fields as redirect URL parameters on an embedded form

Hi @derekcavaliero ,
how can we modify this code within the Hubspot platform please ?
I would love to apply this redirect behavior to a Hubspot form used within a Hubspot landpage !
I tried applying the code on a custom module (module.js) but it doesn’t seem to work !
Thank you