8 Replies Latest reply on Jun 17, 2016 12:30 PM by Sanford Whiteman

    Toggle .js in guided landing pages?

      I have a basic javascript that overrides form redirects when I want the user to stay on the page, and returns a thank-you message. What I'd like is the ability to turn that on or off in the options. I was blindly hoping something like this would work:


      <meta class="mktoBoolean" id="formsendrule" mktoName="Stay or redirect form" default="false" true_value="<script>//the script here</script>" false_value=" " false_value_name="Hide" true_value_name="Show">


      But all the characters in the script break the meta tag.


      I saw a couple suggestions for future improvements to solve this problem, in this post: Guided LP enhancements


      But I'm wondering if anybody's come up with a work-around? One thought I had is maybe using the mktoBoolean to show/hide a simple class name somewhere, then adding an if statement to the .js script itself so it only fires if div X has class Y, or something.

      For reference, the basic .JS is:



      MktoForms2.whenReady(function (form){

        form.onSuccess(function(values, followUpUrl){


         document.getElementById('confirmform').style.visibility = 'visible';

         return false;