SOLVED

Help fixing 'Uncheck all' code on preference centre page

Go to solution
trevlarrr
Level 4

Help fixing 'Uncheck all' code on preference centre page

Hi,

I know there's a few threads about this and I've tried following the solutions like the one here: https://nation.marketo.com/t5/product-discussions/subscription-preference-center-page-forms-and-unch... but I can't work out what I'm doing wrong with the code to make this work.

 

We have a preference centre for subscribers to opt in and out of our various emails and when they visit it's pre-populated with ticks for their relevant subscriptions.  When they check the 'Unsubscribe from all' I want it to untick all those boxes, I've tried the solutions in a few threads like the above from @SanfordWhiteman but it's not working for me.

 

Can anyone see what I'm doing wrong from this page: https://go.wilmingtonplc.com/Axco-Manage-Your-Communication-Preferences.html

1 ACCEPTED SOLUTION

Accepted Solutions
Dave_Roberts
Level 10

Re: Help fixing 'Uncheck all' code on preference centre page

The form's unsubscribe field has an id of "axcoUnsubscribe". (Image 1)

It looks like the script is looking for a field with the id of "Unsubscribed" the way you've got it setup. (Image 2)

 

If you edit the script to change "Unsubscribed" to "axcoUnsubscribe" it might work out the issue here. 

 

 

This id="" value of the field on the form is  "axcoUnsubscribe"This id="" value of the field on the form is "axcoUnsubscribe"

 

=================================================================================================

 

The script is looking for a field with id="Unsubscribed"The script is looking for a field with id="Unsubscribed"

View solution in original post

3 REPLIES 3
Dave_Roberts
Level 10

Re: Help fixing 'Uncheck all' code on preference centre page

The form's unsubscribe field has an id of "axcoUnsubscribe". (Image 1)

It looks like the script is looking for a field with the id of "Unsubscribed" the way you've got it setup. (Image 2)

 

If you edit the script to change "Unsubscribed" to "axcoUnsubscribe" it might work out the issue here. 

 

 

This id="" value of the field on the form is  "axcoUnsubscribe"This id="" value of the field on the form is "axcoUnsubscribe"

 

=================================================================================================

 

The script is looking for a field with id="Unsubscribed"The script is looking for a field with id="Unsubscribed"

trevlarrr
Level 4

Re: Help fixing 'Uncheck all' code on preference centre page

You're a star! I'd looked at that so many times and hadn't picked up on it not being the field ID! That's working perfectly now, thanks so much!

SanfordWhiteman
Level 10 - Community Moderator

Re: Help fixing 'Uncheck all' code on preference centre page

You're a star! I'd looked at that so many times and hadn't picked up on it not being the field ID! That's working perfectly now, thanks so much!


Field name, technically. 🙂 Because multiple checkboxes for the same Marketo field have the same name attribute, but not the same id. (Lots of code fails to account for this!)