10 Most Frequently Asked Questions About Marketo Forms (FAQ)

Aug 11
16:28

2019

Eyal Katz

Eyal Katz

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

One of Marketo’s greatest strengths is its web forms. Marketo’s Form Editor and Forms APIs have tremendous flexibility and potential. Both contribute heavily to Marketo’s reputation as one of the top marketing automation solutions. Let’s go over common questions that frequently come up when marketers are building campaigns with Marketo.

mediaimage

One of Marketo’s greatest strengths is its web forms. Marketo’s Form Editor and Forms APIs have tremendous flexibility and potential. Both contribute heavily to Marketo’s reputation as one of the top marketing automation solutions. View our comparison between Marketo and Hubspot for marketing automation.

Let’s go over common questions that frequently come up when marketers are building campaigns with Marketo. We hope this FAQ will steer you toward true Marketo mastery.

Frequently Asked Questions about Marketo Forms Q: How do I hide a Marketo form after submission?

A: You need to use an onSuccess handle like this one. You can find more detailed examples of the code we’re showing you in context on Marketo’s site for this and the next two questions:

 

form.onSuccess(function(values,10 Most Frequently Asked Questions About Marketo Forms (FAQ) Articles followUpUrl) {

        form.getFormElem().hide();

        return false;

    });

 

Q: How do I prevent a user from submitting a Marketo form?

A: If you want to make it impossible for a user to submit a form, this will do the trick:

 

if (form.submittable()) {

form.submittable(false);}

});

 

Q: How do I set values in a hidden Marketo field form?

A: Assuming you’ve configured some hidden fields in the form editor when you created your form, this code lets you load those fields with preset values:

form.vals({"hiddenField1":"true", "hiddenDate":"2019-01-01"});

Q: What are MktoForms2 methods?

A: MktoForms2 is an object used in Marketo’s Forms 2.0 API. It’s one of the two main Forms objects you’ll spend most of your time interacting with. It contains functions for creating, loading, and fetching Forms objects.

Q: How can I see form submissions for a given time period?

A: If you want to sort and organize reports by the time of their submission, that’s easy enough to do. However, this method will only enable you to track forms by submission time going forward, not retroactively.

The following code will add a hidden field to a form that records a timestamp when the form is submitted:

MktoForms2.whenReady(function(form){

  form.onSubmit(function(form){

   form.addHiddenFields({ LastFormFilloutDateTime : new Date().toUTCString() });

  });

You can then use the timestamp value to sort and filter submitted forms in any spreadsheet or database program they’ve been exported into.

Q: How can I capture lead information in Marketo from a non-Marketo form?

A: In theory, this isn’t too difficult to do with a plain HTML form. It can get complicated depending on the types of forms you’re using, but the Marketo community has some coding suggestions for this circumstance.

Q: How do I turn off Munchkin code for Marketo forms?

A: This code will clear the Munchkin cookie value upon submission of the form, but does not delete the cookie itself:

MktoForms2.whenReady( function(form){ 

form.addHiddenFields({"_mkt_trk":""});

form.onSubmit( function(form){

form.vals({"_mkt_trk":""});})

})

The Munchkins will effectively “forget” who submitted the form and you’re free to await the next submission.

Q: How can I make a success message show in an embedded Marketo form?

A: If you don’t want to boot your lead over to a different web page once they’ve successfully submitted your form, you can show them an in-line confirmation message.

Here’s some code for a simple success message:

form.onSuccess(function(values, followUpUrl) {

form.getFormElem().html("Your form has been submitted!");

form.getFormElem().css("text-align","center");

form.getFormElem().css("font-family","'Helvetica'");

return false;

})

Q: How can I create a Marketo form with two fields in the same row and one field in another row?

A: There are a few different ways to approach the problem.

The most effective method may be to use an advanced framework using custom CSS, allowing you to use advanced field customization and placement features.

Q: How can I gate online content using a Marketo form?

A: One way to turn a form into a content gate is to use the Known Visitor HTML feature, which can be found in Form Editor settings. This will display custom HTML pages to “known visitors,” a status you can set once they submit the form.

Conclusion

With a little creativity in their design and placement, web forms can help you extract all kinds of great information from your leads. It’s hard to beat Marketo when it comes to putting the full weight of your MarTech stack behind efforts to utilize that information.