External Webpage, external form, but want to pass back a form fill activity | Community
Skip to main content
Bryant_Chang
New Participant
July 1, 2015
Solved

External Webpage, external form, but want to pass back a form fill activity

  • July 1, 2015
  • 1 reply
  • 7234 views

Developer question,

I am using an external webpage and external form for our homepage.

We want to be able to pass back a "filled out form" activity when they fill out that external form on our homepage.

looking at the resource page on munchkin, we are only able to push back "associatelead, clickedlink, visitedwebpage" activity types.

Is there resource on how we can push back a filled our form activity type?

Thanks

Best answer by SanfordWhiteman

You don't use Munchkin for that, you use the Forms 2.0 API.

Create a dummy Marketo form to use for logging.  Then, in your external form's onsubmit (everything in {} is to be customized for your install):

var formEl = document.createElement('FORM');

formEl.id = 'mktoForm_' + {formid};

formEl.style.display = 'none';

document.body.appendChild(formEl);

MktoForms2.loadForm('//{instancename}.marketo.com', '{MUNC-HKIN-CODE}', {formid}, function(form) {

    form.submit()

});

Of course, even easier is switching to using embedded Marketo forms on your external website and tossing your other form.  It avoids duplicate work and gets the fields in Marketo where they (presumably) belong.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
July 1, 2015

You don't use Munchkin for that, you use the Forms 2.0 API.

Create a dummy Marketo form to use for logging.  Then, in your external form's onsubmit (everything in {} is to be customized for your install):

var formEl = document.createElement('FORM');

formEl.id = 'mktoForm_' + {formid};

formEl.style.display = 'none';

document.body.appendChild(formEl);

MktoForms2.loadForm('//{instancename}.marketo.com', '{MUNC-HKIN-CODE}', {formid}, function(form) {

    form.submit()

});

Of course, even easier is switching to using embedded Marketo forms on your external website and tossing your other form.  It avoids duplicate work and gets the fields in Marketo where they (presumably) belong.

Bryant_Chang
New Participant
July 1, 2015

Thanks Sanford!

Believe this is exactly what I was looking for. Will send this to my dev guy.

Reason we are not using a marketo form is because its a single field form (just email address) and want to have the button on the right of the field, which I couldn't get to work in the form builder. Is this possible in marketo?

Either way thanks for your response.

SanfordWhiteman
New Participant
July 1, 2015

Sure, it's possible.  Probably needs a little custom CSS is all.  And for something so simple it's a pity to have to use an external form for it.  In fact, I'm not sure if you're aware of this, but if you post the Marketo form with the user's email address the lead's web activities will be tracked, which is an important part of marketing automation.  if you use only an external form then an organic visit to your site will remain anonymous, even if it includes a form fillout. That's not so good.

What's the URL of your page?