Document the leadCapture/save2 Endpoint

Document the leadCapture/save2 Endpoint

Looking over page calls for Froms 2.0 I noticed that the endpoint wasn't leadCapture/Save but it was leadCapture/Save2. And also that this endpoint accepts JSON no longer XML form url-encoded. This excites me because as a developer. I use json in almost all of my Front-end javascript applications and it would be great to get more insight and documentation on this.

The error I recieve now is No Subscription ID - which I don't know where to pass that. Adding documentation on this endpoint would be great and I think a step forward towards a full REST API.
12 Comments
Anonymous
Not applicable
I am also currently blocked with the "Form error, no subscription ID" error. Did you ever figure anything out @Ecavazos?
Anonymous
Not applicable
Ecavazos - was this ever solved? experiencing the same issue.
Rasmus_Bidstru1
Level 4

any advice on this? got same issue

Anonymous
Not applicable

I am having this issue as well, along with

Error getting form forwarding urls. Form not saved.

SanfordWhiteman
Level 10 - Community Moderator

"No subscription ID" means the munchkinId field is not present in the form.  This should never happen if you use the standard embed code, which includes the ​muinchkinId ​as a hidden field.  Post a link to your form in action.

Anonymous
Not applicable

We are using standard embed code but experiencing this same issue:

http://www.periscopegroup.com/injury-survey-step1

Embed code:

<script src="//app-sj13.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1467"></form>

<script>MktoForms2.loadForm("//app-sj13.marketo.com", "528-XSR-225", 1467);</script>

Need to fix immediately. Am I missing something?

SanfordWhiteman
Level 10 - Community Moderator

I don't see the same issue on your page, but there certainly is a problem.

Looks like you're causing it by loading another form from //injuries.periscopegroup.com:

pastedImage_1.png

This causes a cascade of errors I won't bother detailing here. Switching to //app-sj13.marketo.com as in your other embed code should take care of it (though may surface another error, can't know until you fix this).

Anonymous
Not applicable

Thank you for the prompt response, Sanford. You're right that it wasn't exactly the same, but I'd meant that subscriptionID was missing—a topic that hasn't been covered too deeply in the forums—so this was the closest match I could find.

On initial QA, it seems like switching the embed code fixed the issue:

http://www.periscopegroup.com/injury-survey-tort-step1

How that changed in the first place is another question altogether, though I suspect it would've had to of been on our end vs. Marketo. I am curious about the issue with using two embed codes on the same page. We've been doing so for some time without issue, but certainly want to avoid any issues in the future. Any further information you could provide—or point me to MKTO best practices on serving multiple forms—would be much appreciated.

Thanks again for your help.

SanfordWhiteman
Level 10 - Community Moderator

Multiple forms loaded from the same domain *mostly* work, with some cosmetic drawbacks that can be surmounted with custom JS. Loading from different domains has fatal problems, though.

Anonymous
Not applicable

Thanks very much, Sanford. You were a huge help today with a tough issue.

We were able to circumvent the cosmetic stuff with form-specific css, but you calling out potential issues is appreciated. Back to business now. Have a great night!