1 2 3 4 5 |
<script src="//app-sj01.marketo.com/js/forms2/js/forms2.min.js"></script> <form id="mktoForm_116"></form> <script>MktoForms2.loadForm("//app-sj01.marketo.com", "410-XOR-673", 116, function(form) { form.getFormElem()[0].querySelector('button[type="submit"]').insertAdjacentHTML('afterend','<button type="reset" class="mktoButton">Reset</button>') }); </script> |
Tag: Forms
Execute Form Submission Actions from Iframe to Parent Page
We have seen a few cases where users use iframe forms and want to direct visitors that filled in the form to a thank you page or PDF, video, etc. The problem is that since the form is embedded on a landing page which is different from the parent one, the action happens only on … Continue reading “Execute Form Submission Actions from Iframe to Parent Page”
Change the Hint Text Color on a Marketo Form
Let’s say you want to change the hint text color (also referred to as the placeholder text) in Forms 2.0. This is possible via custom CSS. For example, in the screenshot below I made the hint text in this Marketo Form blue. There are three options on how to do this depending on how you … Continue reading “Change the Hint Text Color on a Marketo Form”
Show Thank You Message Without a Follow-Up Landing Page
Typically, when you use Marketo forms, you create two landing pages – one to place the form on and one to redirect to after the form is completed. However, in some cases, you may not want to have two separate but very similar landing pages to maintain. You can actually use the same landing page … Continue reading “Show Thank You Message Without a Follow-Up Landing Page”
Add a Confirmation Alert to a Marketo Form
Let’s say when a user click the “Send” button on a Marketo form, you would like to display a notification that asks the user if “Is it really ok to send”?. This possible by implementing a few lines of JavaScript, which will show a confirmation box when somebody clicks the Send button. Here’s an example … Continue reading “Add a Confirmation Alert to a Marketo Form”
Add a Full Name Field to a Marketo Form
We know that shorter web forms improve conversion rates. The Javascript code sample below allows you to make your forms even shorter by merging the First and Last Name fields into one Full Name field. When visitors are typing in their full name, the script will automatically break the text into first and last name … Continue reading “Add a Full Name Field to a Marketo Form”
External Page Prefill
Marketo forms do not provide native prefill functionality when loaded outside of a Marketo landing page. However, we can still implement this using the Marketo APIs and the Forms 2.0 JavaScript API. The first step is to retrieve the lead data from Marketo via a REST call from your server. Assuming that we do not … Continue reading “External Page Prefill”
Add Location Data from RTP API to Marketo Form Fill Out
You’ll need active RTP and MLM subscriptions to implement the use case described in this blog post. Using the RTP JavaScript APIs and Marketo Forms 2.0, you can pull the inferred location data from RTP and push it into Marketo via a form fill out. This will allow you to see the user’s inferred location … Continue reading “Add Location Data from RTP API to Marketo Form Fill Out”
Restrict Free Email Domains on Form Fill Out
Let’s say you would like to restrict site visitors from submitting a form with a free email domain, such as Gmail or Yahoo. To accomplish this, include the script below in the source code of the page with the Marketo form. It will check if a user entered a non-business email (Gmail, Hotmail, etc.), and … Continue reading “Restrict Free Email Domains on Form Fill Out”
Hide Lightbox After Form Submission
Overview The current lightbox embed code generated by Marketo does not disappear when the form is submitted. It will reload the page after form submission, and the form will appear again. If you would like to create a lightbox that hides after form submission, then please follow the steps below. How to Guide 1. After … Continue reading “Hide Lightbox After Form Submission”