I'm attempting to switch our content forms to 1 global form (on non-marketo pages) but I'm running into issues when it comes to getting the correct PDF to open. The goal is for each content landing page to use the global form and then upon hitting the 'submit' button the PDF for that content downloads. They do not go to a different landing page or get sent an email.
I know how to add the code for the global form but how do I get the correct PDF to download?
You won't be able to do this with anything out of the box in Marketo that I know about. This requires a custom setup/process.
The use case of the need to direct a person to a unique asset on form submission means a global form may not be the best for you, completely IMO.
However, to answer your question, I would probably create a custom script to fire off upon form submission and evaluate against a UTM parameter (clearly defining the UTM and mapping it to what asset should be served up).
Well, your task is clear: the page that hosts the form needs to know the URL of the related PDF!
Whether that URL is supplied as a query param (as Jim suggests) or perhaps is supplied via a page variable set up in your CMS (for example, a WordPress site can have a page type that requires the page author to supply a string variable) is up to you. The end goal is the same.
For a UTM param mapped to the field lastAssetURL in Form Editor:
var currentValues = form.getValues();
document.location.href = currentValues.lastAssetURL;
For a page variable set using some other method:
var currentAssetURL = Your_WP_Variables.assetURL;
document.location.href = currentAssetURL;