Capturing Lead Info From External Form

Moyes
Level 1

Capturing Lead Info From External Form

Hello, 

 

We are about to launch an "sub" product/website. The website has a non-Marketo form that is used create an account and to gain access to the content. 

What I would like to do is capture these form fills in Marketo, and update or create leads. In most instances, it would be just simply checking a box to say they have completed the external form. For some, to capture all other usual lead data. 

 

What is the best way of doing this? 

Thanks
Rob

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing Lead Info From External Form


For some, to capture all other usual lead data. 

Well, if you sometimes need to do this, your code must support it. Doesn’t matter if it’s not always used!

 

The approach is to

  • listen for the visible form’s submit event
  • preventDefault()
  • pass the visible form’s values to a hidden Marketo form
  • listen for the Marketo form’s success event
  • submit the hidden Marketo form
  • in the Marketo onSuccess, POST to the visible form’s original destination

An example of the logic is here:

 

HTML :: Vanilla HTML <form> to hidden Marketo form (with HTML submit)

 

Naturally your developer needs to be familiar with the nuances of such DOM form and Marketo form events.

 

Also, this demo assumes the visible form is using native <form> submit handling. If it has its own custom handler, you need to short-circuit that logic and then continue with the same pattern (Marketo form, onSuccess, then visible form).

SanfordWhiteman
Level 10 - Community Moderator

Re: Capturing Lead Info From External Form

@Moyes please return to your thread and check responses.