SOLVED

MktoForms2 :: Checkbox → Dependent Select

Go to solution
Mark_Wallace1
Level 4

MktoForms2 :: Checkbox → Dependent Select

I have been using this code which works very well on a subscription center page.  User can have any number of newsletters selected but then on clicking unsubscribe all of their newsletter selections are removed.  Perfect.

Only issue is if the users changes their mind and then checks a newsletter checkbox the unsubscribe field remains checked.

My skills in this area are quite limited.  Is there an easy way to implement the reverse of this such that if a newsletter selection is checked after the unsubscribe the unsubscribe setting is removed?

Thanks in advance.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select

It would have to be more like this:

 

MktoForms2 :: Checkbox ↔︎ Co-dependent Checkboxes or Select - no NULL

 

But I’m not sure you’re taking into account what happens if you don’t have NULL as a checkbox option within the Checkboxes set (that is, to clear out their current subscriptions).

View solution in original post

9 REPLIES 9
Vladislav_Vagn1
Level 5

Re: MktoForms2 :: Checkbox → Dependent Select

Hi Mark,

 

You could try to create a separate triggered smart campaign that looks for a change in that value. Something like, 

Smart List Trigger: Data Value Changes -> Data Value is "BU Newsletter" and New Value is "yes" (you can also add a filter that says Unsubscribed = TRUE to make sure you are only pulling in unsubscribed people)

Flow: Unsubscribe = False

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select

I’ll modify the code to be bidirectional by this evening and post back.
SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select

Mark_Wallace1
Level 4

Re: MktoForms2 :: Checkbox → Dependent Select

Thank you for your super quick reply, its doing exactly what I need on the codepen page.  But applying the code to my page Im having an issue.

I have update the fields in the code so they are deselecting on checking unsubscribe.  But the bidirectional part is not working.  I cant see anywhere where I need to tweak the code.  Im using checkboxes for the newsletter selection but not sure thats the issue.

Any suggestions would be very much appreciated.

 

thanks in advance.

 

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select


Im using checkboxes for the newsletter selection but not sure thats the issue.

That’s exactly the issue, because the code is built to sync a Checkbox with one or more Selects. Not any field.

Mark_Wallace1
Level 4

Re: MktoForms2 :: Checkbox → Dependent Select

Thank you, I thought as much.  And I presume its not as straight forward as switching the select and checkbox refs in the code for checkbox and checkboxes (if that is the correct text for those items)?

SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select

Nope, not that simple.
SanfordWhiteman
Level 10 - Community Moderator

Re: MktoForms2 :: Checkbox → Dependent Select

It would have to be more like this:

 

MktoForms2 :: Checkbox ↔︎ Co-dependent Checkboxes or Select - no NULL

 

But I’m not sure you’re taking into account what happens if you don’t have NULL as a checkbox option within the Checkboxes set (that is, to clear out their current subscriptions).

Mark_Wallace1
Level 4

Re: MktoForms2 :: Checkbox → Dependent Select

Thank you, I have got this working now and it seems to be behaving as expected in both direction, just testing further.