SOLVED

Re: API issue

Go to solution
Anonymous
Not applicable

API issue

Right now we have our website running off of Kentico. The forms on the website are Kentico form as these are much easier to update and change to fit the website. Currently we have these forms API in the leads into Marketo. Is there a way to set this up to where we can get the Kentico forms to register as a marketo form submit in any way while still using Kentico forms and not embedded Marketo forms? The API makes it hard to do reporting on the back end.

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: API issue

Here's a guide to the server-side form submit: http://developers.marketo.com/blog/server-side-form-post/

For the client-side cross-submit, here's a quite elaborate example I did for someone else in the Community: MktoForms2 :: StdForm to MktoForm

This person was using DotNetNuke (.NET CMS) and wanted to post their DNN-created form to Marketo instead of to their .NET server.

The form fields in DNN were different from the corresponding ones in Marketo.  So the bulk of the code is setting up some helper functions to map old names to new names (which you'd likely have to do for the server-side version as well, unless your field names happen to be exactly the same).

The client-side process is simple at a high level:

  • get fields from your Kentico form into a JS object of some kind
  • map field names to Mkto fields if necessary
  • add hidden Mkto form to page
  • run Mkto ​form.addHiddenFields()
  • submit Mkto form

View solution in original post

4 REPLIES 4
SanfordWhiteman
Level 10 - Community Moderator

Re: API issue

Absolutely.  You can do a server-side form submit (which I don't actually recommend, but which works) or a silent cross-submit from the client using the Forms 2.0 API. 

In both cases, you are impersonating the submission of a Mkto form, including its ID, and therefore you get Filled Out Form activities as desired.

Anonymous
Not applicable

Re: API issue

Thanks for the quick response!

I have been looking for documentation on how to do the server-side form submit. I couldn't find anything on here, i've seen it mentioned before but never anything on how to actually set it up. Can someone provide me with some instructions or documentation on how this works and how to set it up.

I have never heard of the silent cross-submit before but i'm willing to try either, I would just need some more instructions on how to set it up.

Thanks,

Andreas

SanfordWhiteman
Level 10 - Community Moderator

Re: API issue

Here's a guide to the server-side form submit: http://developers.marketo.com/blog/server-side-form-post/

For the client-side cross-submit, here's a quite elaborate example I did for someone else in the Community: MktoForms2 :: StdForm to MktoForm

This person was using DotNetNuke (.NET CMS) and wanted to post their DNN-created form to Marketo instead of to their .NET server.

The form fields in DNN were different from the corresponding ones in Marketo.  So the bulk of the code is setting up some helper functions to map old names to new names (which you'd likely have to do for the server-side version as well, unless your field names happen to be exactly the same).

The client-side process is simple at a high level:

  • get fields from your Kentico form into a JS object of some kind
  • map field names to Mkto fields if necessary
  • add hidden Mkto form to page
  • run Mkto ​form.addHiddenFields()
  • submit Mkto form
Danny_Tran5
Level 3

Re: API issue

Thanks, Sanford. You're posts/responses are always so helpful and very much appreciated.