mulpitle forms on a landing page for a game challenge

Anonymous
Not applicable

mulpitle forms on a landing page for a game challenge

Hello,

i was wondering if any one have used 2 or more forms on their landing pages. For example - the landing page will include the basic form information. and then include some type of game challenge questions. How do I build the form and the trigger flow? Do i have to build and customize each individual fields? How do i track the answers? I realized that i will have 2 submit button but i only want 1 submit button to the answer page.
Tags (1)
2 REPLIES 2
Anonymous
Not applicable

Re: mulpitle forms on a landing page for a game challenge

You can accomplish this with an iframe but will likely need a web developer unless you are savvy with HTML/CSS.

More info about iframes: http://www.w3schools.com/tags/tag_iframe.asp

In Marketo, you'll simply create 2 sets of landing pages, forms and campaign flows. One will be embedded in the page as an iframe, and the other will exist on the page as a normal form.
Anonymous
Not applicable

Re: mulpitle forms on a landing page for a game challenge

Here is the code I used to accomplish this.  Should work for you with no probs.  Modify to call you .js file.

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
 
<button id="submitAllForms">Submit</button>
 
<script type="text/javascript">
    var myform;
    $.ajax({
        url : '//app-ab02.marketo.com/js/forms2/js/forms2.js',
        dataType : 'script',
        cache : true,
        success : function() {
            MktoForms2.whenReady(function(form) {
                form.onSuccess(function(a,b) {
 
                });
            });
        }
    });
    $('#submitAllForms').click(function() {
        var forms = MktoForms2.allForms();
        $.each(forms, function(i, form) {
            form.submit();
        });
    })
</script>