Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Anonymous
Not applicable

Multiple Submit Buttons like Marketo uses on their email subscription page

Here is Marketo's page: http://pages2.marketo.com/emailsubscription

How do I set up my own email subscription page like Marketo has? The three buttons, save, 90 day suspend, and unsub all are three list items in a div with class "submit-buttons".  Anyone from Marketo care to share the info-wealth on this? 

Thanks! 
Ben 
Tags (1)
6 REPLIES 6
Josh_Hill13
Level 10 - Champion Alumni

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Ben,

There is a thread on this somewhere. The multiple buttons require some javascript, so this is not possible with the default Form in Marketo.

You can replicate the choices in a select box or checkbox.
Jep_Castelein2
Level 10

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Hi Ben, you'll have to develop some JavaScript to accomplish this: for example, I believe the "unsubscribe" button will first check the hidden "unsubscribed" field, then submit the form. The 90-day suspend will check another hidden field which triggers the Marketing Suspend Smart Campaign. 

The actual implementation of the Marketo subscription center was done on Forms 1.0. It should be a lot easier with Forms 2.0. Unfortunately, therefore it's not possible to copy over the current JavaScript code to Forms 2.0. 
Anonymous
Not applicable

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Thanks Jep and Josh, we will probably come up with a hybrid solution. We would like to host the form on our site so custom scripts will be the answer. I'm curious if anyone has leveraged RTP to customize the preference center forms. Seems easy to use the embed code in RTP inline mode.
Anonymous
Not applicable

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Update:  

We have figured out that if we put the jquery in the form embed tag itself it will work.  Here is the code we used (generalized) so hopefully it will help someone else in the future. We set up a form with all check boxes for each field and customized the jquery to uncheck any subscription links if the unsubscribed options are clicked. 

Our page: http://www1.appliedsystems.com/en-us/email-preferences/ 
        
  <script>MktoForms2.loadForm("//app-abk.marketo.com", "XXX-XXX-XXX", XXXX(form ID #), function(form){form.onSuccess(function(values, followUpUrl){location.href = "URL of follow up page";return false;});

          $("input#Unsubscribed.mktoField").click(function() {
                if(this.checked) {
                $("input#ID.mktoField, input#ID.mktoField, input#ID.mktoField").prop( "checked", false );
                }
                });
                $("input#ID.mktoField, input#ID.mktoField, input#ID.mktoField").click(function() {
                if(this.checked) {
                $("input#Unsubscribed.mktoField, input#ID").prop( "checked", false );
                }
                });
                $("input#Unsubscribed.mktoField, input#ID").click(function() {
                if(this.checked) {
                $("input#ID.mktoField, input#ID.mktoField, input#ID.mktoField").prop( "checked", false );
                }
                });
                $("input#ID.mktoField, input#ID.mktoField, input#ID.mktoField").click(function() {
                if(this.checked) {
                $("input#Unsubscribed.mktoField, input#ID").prop( "checked", false );
                }
                });
                });
            </script>        
Anonymous
Not applicable

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

Hey Ben, This is an older thread so I'm not sure if you will get this, but I'm working with that javascript code you gave....what are the "customizable" parts of that script? I'm guessing the Unsubscribed.mktoField is one -- so I'd input whatever our unsubscribe field name is there before the ".", right? What else? Trying to make this work! Thanks!

SanfordWhiteman
Level 10 - Community Moderator

Re: Multiple Submit Buttons like Marketo uses on their email subscription page

There is far more modern code for this.  Search my posts for "checkbox" and you'll find sample of various checkbox interactions.