Hi! We're looking for a way for our client to add their preferred target URL into a custom field on a post, which then defines the redirect of the form (using Hubspot embed as the client prefers this to using something like Gravity etc).
just one recommendation: Change "onFormSubmit" to "onFormSubmitted" since this will trigger the redirect after the form is submitted. When you're working with "onFormSubmit" submissions can get lost/not be submitted and the user/visitor is just redirected