Re: Subscription Management

Anonymous
Not applicable

Subscription Management

Hello Everyone,

We created a new subscription center landing page.

I am trying to do the below thing on my subscription center landing page but it is working sometimes and sometimes it is not.

If any leads come on the page and clicks on unsubscribed for all checkbox then all the five checkboxes will get checked off and vice versa.

Note: Top 5 checkboxes will be marked checked for subscribed lead.

http://pages.ciphercloud.com/Subscription-Management_Subscription-Management-final.html#loaded

Thanks
Tags (1)
6 REPLIES 6
Anonymous
Not applicable

Re: Subscription Management

jQuery("#Unsubscribed").click(function() {
  if(this.checked) jQuery("input[type=checkbox][id!=Unsubscribed]").prop("checked",false);
});

jQuery("input[type=checkbox][id!=Unsubscribed]").click(function() {
    if(this.checked && jQuery("#Unsubscribed").prop("checked")) jQuery("#Unsubscribed").prop("checked",false);
});
Anonymous
Not applicable

Re: Subscription Management

Thanks Ben,

Thanks for such a nimble response. But your logic is also working sometimes and sometimes not.

I am not sure on what event will work for those users who check the the Unsubscribed For All CheckBox
through laptop either through the keypress or button

I would like to have click event for those users who will checked the Unsubscribed For All CheckBox through desktop.

I am not sure on what event will work for those users who check the the Unsubscribed For All CheckBox
through mobile phone either through the keypress or button

Let me know

Thanks
Anonymous
Not applicable

Re: Subscription Management

I think it should work for all the scenarios listed, but you probably have to wrap in jQuery(function() { ...... }); so that the code runs after the form has loaded.
Anonymous
Not applicable

Re: Subscription Management

Hi Ben,

The problem remains still the same. it has stopped working now.
http://pages.ciphercloud.com/Subscription-Management_Subscription-Management-final.html

Can anyone from marketo developers community can chime into this discussion box.

I used the below logic but sometimes it gets failed and sometimes it is not:
$(document).ready(function() {
    $('#Unsubscribed').on('click', function() { 
	alert("unsub"); 
	$('#Event_invitation__c, #Webinar_invitation__c, #Product_updates__c, #Newsletters__c, #Thought_Leadership_Emails__c').each(function() { //loop through each checkbox
               $(this).removeAttr('checked');            
             })
});

    $('#Event_invitation__c, #Webinar_invitation__c, #Product_updates__c, #Newsletters__c, #Thought_Leadership_Emails__c').on('click', function()
	
{
	alert("sub");
    $('#Unsubscribed').removeAttr('checked');
});

   
});



Thanks
David_Mason1
Level 3

Re: Subscription Management

Shreyansh, 

You can achieve someting similar using native Marketo functionality. On your unsubscribe page, add other subscription options below "unsubscribe from all" like we did here: 

http://content.AFLglobal.com/UnsubscribePage.html 

Then I made an "UNSUBSCRIBE FROM ALL" Smart Campaign where: 
  • Smart List includes
    • Trigger - Lead is Created
    • Trigger - Data Value Changes (Unsubscribed)
    • Filter - Unsubscribed is True
  • Flow icludes
    • Change Data Value "eConnect" to FALSE
    • Change Data Value "Electric Utility" to FALSE
    • Change Data Value "Telecommunications" to FALSE
    • Etc.
The above items in your FLOW will include your boolean subscription fields. Hope this helps.
Anonymous
Not applicable

Re: Subscription Management

We tried to implement the Javascript above and found that it needed two small tweaks due to needing to wait until the form is ready and the way Marketo forms2 overlay the labels over the actual checkboxes (in other words, to make those pretty checkmarks in some of the form styles the actual checkbox isn't what's being click on, but rather the label on top of it). Here are the tweaks to the code:

Replace
$(document).ready(function() {
    $('#Unsubscribed').on('click', function() { 
with

MktoForms2.whenReady(function (form){
$("label[for='Unsubscribed']").click (function() {