Shopify themes, liquid, logos, and UX
Hi,
Recently, we display the checkbox in checkout to get customers permission to receive SMS offers.
Is there away to make this checkbox checked by default?
document.queryselector("input#abc[type=checkbox]").setAttribute("checked", true)
Replace abc with the id of the field element. Or do you need even more help to make the change.
Thanks 🙂
And where should I add this code?
Will this be applied on checkout?
Did you figure out where to put the code?
Unfortunatly, not yet.
And I hope that this can be done from settings (just as email subscription box)
You need to have access to shopify plus to do this, presumably you dont have that. Come August nothing like this will be possible on the new checkout, all this functionality is removed to prevent people doing things like this, which protects shopify.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025