Server-side Form Post or API? How are You Capturing Data?

Highlighted
Anonymous
Not applicable

Server-side Form Post or API? How are You Capturing Data?

Working on a process where we will use a non marketo form to capture data within a lightbox and then pass it back to Marketo.

I've read Jep's great layout of the Server-Side App Method. Is this updated and still a best practice?
https://community.marketo.com/MarketoResource?id=kA650000000GsXXCA0
  • Any drawbacks or considerations?
  • Leverage Fills out Form for triggers? If so, do you always have to create a different Marketo form to tell the dfference between a demo submission and a WP submission?
  • Support for URL parameters and hidden fields?
  • Any other recommendations like soap API?


 
Tags (1)
11 REPLIES 11
Highlighted
Level 7

Re: Server-side Form Post or API? How are You Capturing Data?

Hi Jeff,

We have a more updated and thorough article on this at the Developer's Blog:

http://developers.marketo.com/blog/server-side-form-post/

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

There isn't sample code on that blog post but here is what it would look like (also make sure the "app-aba" part of the url is aligned with what it is for your subscription):
 
<form id="myform" action="http://app-aba.marketo.com/index.php/leadCapture/save" method="POST">
<input type="hidden" name="munchkinId" value="Your_Munchkin">
<input type="hidden" name="formid" value="Your_Form">
<input type="hidden" name="Field_You_Want_Updated" value="New_Value">
</form>

Then call submit via JavaScript:

document.getElementById('myform').submit();

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

Does this still work?

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

Yes it does. Are you having difficulties?

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

Yes i do.

I have tried to use http://app-lon02.marketo.com/index.php/leadCapture/save2 .. but  im just getting an Error 400 all the time and "Form error, no subscription ID" error.

so just a normal <input> from an external form.

Do you know what the "subscription ID" in a form is? i cant find any documentation on it

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

You have code exactly as I have above? Including munchkin ID and form ID?

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

Yes including everything

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

My example is not posting to leadCapture/save2. Are you sure you've tried it using the exact setup I showed above?

Highlighted

Re: Server-side Form Post or API? How are You Capturing Data?

Rasmus,

Are you also adding the Email address field so Marketo knows what lead you are trying to update? Otherwise it doesn't make any sense...