I think you mean program more than campaign on the Marketo side, but the answer is certainly "yes."
You can change program membership based on
- hidden fields posted with the form (the field values having been drawn from cookies or current query params like utm_campaign)
- the URL of the page from which the form was submitted (without storing to an intermediate field, just matching the URL in the flow).
Excellent!, Do you happen to know where the documentation for doing this will live? Ive been going through the api and am not sure what to use.
You don't need to use the Forms API for this stuff.
In the Form Editor UI, when you set a field type as Hidden, you can then choose to AutoFill it from a cookie, referrer query param, or current query param.
Then you can have a Smart List that triggers on the Fills Out Form activity, with Flow choices based on the (then-current) value of that form field. If you will be overwriting the field on subsequent form posts by the same lead, it's best to name it like Most Recent Campaign because that makes it clear that it is a field that can change over time: it's not "the" campaign.
Lots of Community posts on these topics.
That makes it easier.