Showing me error: "Invalid schema: setting with id="enable countdown" default must be a boolean "

Showing me error: "Invalid schema: setting with id="enable countdown" default must be a boolean "

Developers_Hub
Shopify Partner
2 0 0
{% schema %}
{
    "name": "Countdown Timer",
    "settings": [
    {
    "type": "checkbox",
    "id": "enable countdown",
    "default": "false",
    "label": "Enable Countdown Timer"
     }
  ]
}
{% endschema %}
<script>
</script>

How to solve this kind of error? What are the changes I have to made up to solve this error? 

@GemPages 

Replies 2 (2)

Niki_K
Shopify Partner
462 47 137

Hi @Developers_Hub,

 

I think you need to use underscore instead of space, like this:

 

"id": "enable_countdown",

 Hope this helps!

Send me a link to your store to niki@ecommercepot.com and I'll help you out.
For more info what I do, visit my agency website ecommercepot.com or my personal website nikikozak.me.

GemPages
Shopify Partner
5625 1262 1280

Hello @Developers_Hub ,

 

Cause: Because default by true or false but you add "false" so the error.

GemPages_0-1681193959536.png

 

You can change the code like this to fix it.

 

{% schema %}
{
    "name": "Countdown Timer",
    "settings": [
    {
    "type": "checkbox",
    "id": "enable countdown",
    "default": false,
    "label": "Enable Countdown Timer"
     }
  ]
}
{% endschema %}
<script>
</script>

 

 

I hope the above is useful to you.


Kind & Best regards, 
GemPages Support Team

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center