Welcome to the Liquify Community

Updated last month

Checkbox field in customiser off

Can we add a checkbox field in the Shopify customiser that will be set to off instead of on?
j
K
7 comments
Hi @Kevin, you mean by default off? or you want to show something if the checkox is off?
I have two items in my section, I want to either turn one or the other on, so when I drag it in, I want to have one set to on, other to off.
But I am now thinking maybe an option for static/moving banner would be more logical. Can I do that with an input field? So an input field that would hide/show one div and show/hide the other?
it will generate a toggle like this
Attachment
Bildschirmfoto_2024-10-08_um_16.22.46.png
you just add a custom element with li-settings:custom="toggle" and inside something like this: {
"type": "select",
"id": "vertical_alignment",
"label": "Vertical alignment",
"options": [
{
"value": "first",
"label": "First"
},
{
"value": "second",
"label": "Second"
}
],
"default": "middle"
}

and on the element itself: li-if="section.settings.vertical_alignment == 'first'"
Did that work? πŸ™‚
@Kevin do ypu have any more questions on this or should i close this one?
Add a reply
Sign up and join the conversation on Discord