Re: Multiple check boxes

Anonymous
Not applicable

Multiple check boxes

On my Unsubscribe form, i am adding in a check box to allow users to either Unsub from our emails or just receive monthly recap emails.

So now there are 2 check boxes, the default boxed checked is to receive monthly recap emails, is there a way to have the marketo form uncheck the Monthly recap check box if someone choses the Unsubscribe from email check box?

pastedImage_0.png

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Multiple check boxes

There is, but I don't think checkboxes give the right UX here.  The web widget that is understood as "set of mutually exclusive options" is the radio button set, not a checkbox set.

Anonymous
Not applicable

Re: Multiple check boxes

Yes, radio button is the way to go here most likely.

Otherwise you can set up visibility rules to help out, but it is not exactly what you want

Anonymous
Not applicable

Re: Multiple check boxes

I created a new field in marketo so that users can select to receive emails once a month, how can i make the radio button update this field instead of the Unsubscribe field.

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Multiple check boxes

Are you saying you want radio button 1 to update Unsubscribe and radio button 2 to update another field? 

Anonymous
Not applicable

Re: Multiple check boxes

Correct.

SanfordWhiteman
Level 10 - Community Moderator

Re: Multiple check boxes

This is quite simple.

The key concepts:

  • the system Unsubscribed field, which as you know has its own special meaning, is a hidden field
  • your radio button set refers to your custom field which lists all the types of subscription, including one called Unsubscribe (alternately, you could call it None or Never or whatever)
  • using a tiny bit of Forms JS, you update the hidden field based on whether or not the lead chose Unsubscribe

Example form:

pastedImage_4.pngpastedImage_9.png

Code (note that Contact_Status__c is the custom field I'm using for subscription type; yours will be different)

MktoForms2.whenReady(function(form){

  form.onSubmit(function(form){

    form.setValues({

      Unsubscribed : form.getValues()['Contact_Status__c'] == 'Unsubscribe' ? 'true' : 'false'

    });

  });

});

Sweet demo action:

http://pages.vaneck.com/Lab-subscription-center.html?mkt_tok=3RkMMJWWfF9wsRogsqjOZKXonjHpfsX64uQrUa%...

Josh_Hill13
Level 10 - Champion Alumni

Re: Multiple check boxes

Use javascript on the page.