Hello,
I've been trying to find some javascript on these forums that will work but have had no luck. Thought I would reach out here in the hopes that somebody can help me out.
Basically the form is going to be used for Subscription Preferences - 8 checkboxes in total.
The last checkbox is 'Unsubscribe from all' - Once checked, I need this checkbox to un-check any other checkboxes that have been checked by the user.
Here is the landing page I'm using the test the form: https://page.elmosoftware.com.au/update_subscription-Centre.html
If anybody can help point me in the right direction that would be greatly appreciated.
Solved! Go to Solution.
MktoForms2 :: Select All Checkbox
Set the Stored Value to * (an asterisk) for whatever field you want to be Select/Unselect All.
If you want to invert the logic, so the box acts as an Unselect All when it's checked, use -* as the Stored Value.
MktoForms2 :: Select All Checkbox
Set the Stored Value to * (an asterisk) for whatever field you want to be Select/Unselect All.
If you want to invert the logic, so the box acts as an Unselect All when it's checked, use -* as the Stored Value.
Hi Sanford
Thank you for replying so quickly.
Just spoke with our marketing team to clarify the functionality.
When a user goes to the page, all boxes will be de-selected - they can then choose what they want to subscribe to.
If they then click on the 'Unsubscribe from all' checkbox - this should only de-select any checkboxes they have previously clicked on.
So basically it only needs to behave as a "de-select all other checkboxes" function and never as a "select all" function.
Is there a dumbed down version of the script that can achieve this?
Thanks again
Nothing needs to be dumbed down in the code, it uses whatever config you have in Form Editor.
So if you only use the -* that's a "positive Unselect All". When it's checked, other boxes are forcibly unchecked.
Let me fix one thing in the code, though, hold on... that's an older Pen and need to recreate the form.
OK, republished now.
Like I said, you can use whatever features you want. * or -* or both. In the demo, one set of Checkboxes has a * Select All, the other has a -* Unselect All.
You're a legend mate!
I'll work on it again tomorrow and update the thread once I get it working.
Thanks again!
Its not working , while putting "*" in stored value .Also tried opposite using "-*"
Hey Sanford,
I'm working with Andrew to get this set up and our form isn't showing the same layout as your screen shot below. Where are you editing the stored value?
Here is a screenshot of our form for reference:
Is there somewhere else in Marketo we should be updating the stored values? I know with picklist values you can edit the API for mapping in advanced settings but since this is a boolean field I'm not seeing an option for a stored value.
Hmm, if you don't use a checkbox set (Checkboxes type) then there isn't a relationship between the fields. (Neither visually/in the DOM, nor under the hood.)
My screenshots are from a Checkboxes field.
It is possible to wire up individual Checkbox (no -es) field together, to create a sort of pseudo-grouping. But that isn't the way I would do it. Rather, I'd have one visible Checkboxes field that splits its values into multiple hidden, Boolean fields when submitting.