Knowledgebase

Sort by:
Please ensure that you have access to an experienced JavaScript developer. Marketo Technical Support is not set up to assist with troubleshooting JavaScript. Summary: Say you want to validate a custom field before someone submits a Marketo form on a Marketo landing page, then let Marketo do it's standard validation.   You can do that by overriding the formSubmit function in Javascript.  You can override it with a Custom HTML element for a single page; you can also add this Javascript to your landing page template so it affects many landing pages.   First, build a Javascript function to execute your custom validation (formIsValid() in the example below).  It should return a value of "true" if the fields validate. If not, return false.   Open the landing page for editing and drag a Custom HTML element onto the web page.  Paste in this Javascript and add your custom validation to the formIsValid() function.   <script type="text/javascript" src="/js/public/jquery-latest.min.js" language="Javascript"></script> <script type="text/javascript">      // set no conflict mode for jquery   var $jQ = jQuery.noConflict();   function myFormIsValid() {     var thisIsValid = true;     // Put your custom validation here.     // If anything goes wrong, set thisIsValid to false.         // for example, show an error message if the email contains "bob"     if ($jQ("#Email[value*=bob]").length > 0) {        Mkto.setError($jQ("#Email ~ span").prev()[0],"No Bobs allowed!");        thisIsValid = false;     } else {        Mkto.clearError($jQ("#Email ~ span").prev()[0] );     }     return thisIsValid;   }   function formSubmit(elt) {     if (!myFormIsValid()) {        return false;     }     return Mkto.formSubmit(elt);   } </script> Here's another example that checks if a required checkbox, such as a terms of service agreement, is filled before submitting: <script type="text/javascript" src="/js/public/jquery-latest.min.js" language="Javascript"></script> <script type="text/javascript">      // set no conflict mode for jquery var $jQ = jQuery.noConflict(); function myFormIsValid() {     var thisIsValid = true;       // show a message if they fail to check the box     if ($jQ("#TermsOfServiceAgreement").attr('checked') != true) {        Mkto.setError($jQ("#TermsOfServiceAgreement ~ span").prev()[0],"Please agree to the terms above.");        thisIsValid = false;     } else {        Mkto.clearError($jQ("#TermsOfServiceAgreement ~ span").prev()[0]);     }     return thisIsValid; } function formSubmit(elt) {     if (!myFormIsValid()) {        return false;     }     return Mkto.formSubmit(elt); } </script>   Follow these instructions if you want to retrieve the form fields via Javascript: Setting or Getting a Form Field Value via Javascript on a Landing Page The example above also shows you how to set an error field If you want to set or clear an error message on a field, you can use these two functions in your validation function. Note: These only work on form fields from the Marketo form designer. Replace the highlighted yellow bits below: Email -- the ID of the field where you want to show an error error message -- the text you want to display for this error           // error -- highlight the field           Mkto.setError($jQ("#Email ~ span").prev()[0], "error message");             // no error -- clear the field           Mkto.setError($jQ("#Email ~ span").prev()[0]);  
View full article
Issue Issue Description When any link within an Email is clicked, the user is redirected to the wrong page.   Solution Issue Resolution This can occur when Branded Tracking Links have been incorrectly configured and the user is being redirected to the fallback page. The following checks should be conducted: 1. Ensure the correct Branding Domain is listed in Admin > Email > Branding Domains. 2. Ensure your IT team have set a CNAME record to redirect from your Branding Domain to your Marketo Tracking Link. (e.g.mkto-****.com) Who This Solution Applies To Customers using Branding Domains
View full article
Issue Issue Description When validating the HTML of a template, you receive an error of 'Error: Nested Editable Element: ...' with the id of the element following causing you to not be able to approve the template.   Solution Issue Resolution This is due to having an element with a 'mkto...' class nested inside another element with a 'mkto...' class. Below is an example:    <div class="mktEditable">      <div class="mktEditable"></div> </div>   You will need to remove the 'mkto...' class reference from one of the elements to be able to pass validation and approve the draft as in the corrected example below:    <div class="mktEditable">      <div class="newClassName"></div> </div>  
View full article
Issue You would like to know which partition a record that was captured by using "Forward to a friend link" in an email will be created in. Solution The record will be created under the partition which is associated with the work space under which the email asset is present. The record will not be created under the default partition.  For example, if you have a workspace named "Asia" which is connected with the partition named "APAC", then leads created via Forward-to-Friend links in emails stored in the "Asia" will be created in the "APAC" partition.
View full article
Issue You go to a Marketo form that has prefill enabled and see that it contains some other person's information. Solution Form prefill can display another person's information if a Marketo email sent to one person is then forwarded to someone else.  Clicking on another person's tracked link cookies you with their information and causes it to prefill in the form.  To correct this, clear the cache and cookies on your browser.  If you would like to make sure this does not occur with your customers, please disable form prefill for the fields on your form.  There is nothing wrong with the forms or landing pages themselves, it is simply a matter of another person's cookie being placed on the browser by the forwarded email tracking link.  
View full article
Issue Can the {{system.unsubscribeLink}} be customized to point to a different page, such as a preference center?     Solution Issue Resolution The system token unsubscribe link will always behave the same way, and it cannot be customized. The {{system.unsubscribeLink}} will always bring you to: sub.domain/UnsubscribePage.html. If your Landing Pages are not branded, this system token will still behave the same way and take the lead to your out-of-the-box Marketo Unsubscribe Page (ending in /UnsubscribePage.html). If you want the link to go to a different page, the easiest workaround is to create a redirect rule that sends visitors to UnsubscribePage.html to your custom page instead.
View full article
Issue You have a CNAME for your Branded Tracking Links in email but want to restore the settings to the system default (example: mkto-ab01234.com).     Solution Once you have set up a Branded Tracking Link domain, it is not possible to restore it to the Marketo default.  You can change it to a different CNAME domain, but it is not possible to revert to the original.
View full article
Issue When you add variables to your email template assets, the value assigned to that variable is not showing in the text-only version of the email even though it shows in the HTML version. Solution Email 2.0 variables do not pass the defined values for variables through to the text-only email. Since Marketo token values are passed through to the text-only email, customers may expect variable values to also be passed through to text-only emails. However, this is not currently the case.
View full article
Issue None of your tokens are rendering inside of your .ics Calendar File token and instead are showing as the {{lead._____}} form.     Solution This is caused when a single token has an undefined value, such as a 'My Token' which doesn't exist in your Program. Send yourself a version of the Calendar file and look for a blank space where a token should be- This will be the token causing the others to not work. Make sure to define a value for this token and then your Calendar File will render without issue.    
View full article
Issue When you try to drag and drop elements (form, rectangle, etc) into a free-form landing page, nothing happens.     Solution If the free-form template is not mobile compatible, you may experience this issue. Please make the template mobile compatible to fix it. Refer this article to make the existing free-form template mobile compatible: Link - https://docs.marketo.com/display/DOCS/Make+an+Existing+Free-form+Landing+Page+Template+Mobile+Compatible    
View full article
Issue You are utilizing Forms on Marketo Landing Pages, and want to run reporting on these forms.     Solution Currently Marketo has reporting for Email assets and Landing Pages. We do not have the ability to report on Forms specifically. One option would be to use Web Page reporting  -  this reported information would be limited to Marketo Pages with numbers of records who filled out the form, listed under "conversions." You could then create a Smart List to identify leads who have filled out these forms.        
View full article
Issue You want to customize the error message shown if a form field is left blank or the wrong type of data is entered. Solution Open the form in Design Studio and select the field you want to update the validation message for. Select "Validation Message" on the right hand side of the screen. In the dropdown menu, select "Custom instead of the default "Standard" and enter your custom error message.        
View full article
Issue Is there a way to prevent opening a new browser window when a mailto/email address link in an email is clicked? Solution The reason why the link clicked in an email redirects to a new browser window occurs is because the link is a tracked link. As per design of Marketo tracked links, they are required to be loaded in a browser first which is why the mailtolink/email address clicked is loading in the browser first. If you wish to load the link clicked in the same window and not redirect to a new browser window, you will need to disable tracking on the link. https://docs.marketo.com/display/public/DOCS/Disable+Tracking+for+an+Email+Link    
View full article
Issue A landing page is taking a significant time to load. Solution The load time of a landing page is generally due to resources that have a large file size or due to third-party scripts. This can be identified by using tools like https://tools.pingdom.com/ that breaks down the loading time of individual resources and scripts within a landing page. Another way to inspect the loading time of resources and scripts within a landing page is using the network feature of the developer tools in Google Chrome, Firefox, Safari or any other web browser: https://developers.google.com/web/tools/chrome-devtools/network-performance/reference https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor https://developer.apple.com/safari/tools/    
View full article
Issue You click on a link in a sample email to test form pre-fill, but when you do, the form is not pre-filled. Solution When sending sample emails, the send sample feature does not generate links which are captured by the web browser, so the form pre-fill information is not passed. The test needs to be performed by sending an email using one the features below:   Single Flow Action "Send Email" in a Smart List A Smart Campaign An Email Program Once a live email has been sent and not a sample email, the tracked link which contains the mkt_tok passes the lead info and the form will now pre-fill with that lead's information until the cookies are cleared, a new browser is used or an incognito browser is used.
View full article