I'm currently trying to implement a Marketo form with some custom logic for being progressive.
What I currently have working...
1) I have Munchkin code on my page
2) The page can make a REST call to Marketo with a LeadId, and based on the returned values is decided what fields to show, and it prefills them if data already exists.
What I need to do...
1) Submit the fields back to Marketo. I have the ID of the Form in Marketo, if there is a way to get around the nested <forms> and submit.
2) Updating the Lead directly would work, however I'm not sure how to create a new Lead using just the Munchkin cookie code. I've figured out how to use filter types to see if a Lead already exists for the Munchkin code, but not how to create a new Lead on submit.
Any help or suggestions would be appreciated.
Using the REST API is neither advisable nor necessary here, as Marketo forms natively support Progressive Profiling. You should never use the REST API in response to individual end-user actions.
Please post a link to a sample Sitecore page withoiut the form and where you want to insert the Forms 2.0 <FORM>. I'll show you how it's done.