Ad

Settings_schema.json In Shopify - Adding And Deleting Fields

- 1 answer

I have a settings_schema.json file in a Shopify store that contains data pertaining to text fields for a Q&A type section of the site. A snippet of the file is below:

... { "name": "FAQs", "settings": [ { "type": "header", "content": "Shopping" }, { "type": "text", "id": "faq_dropdown_text_shopping_q1", "label": "Shopping Question Dropdown 1" }, { "type": "text", "id": "faq_dropdown_text_shopping_a1", "label": "Shopping Answer Dropdown 1" } ...and so on

I want to use this file to populate a jQuery based dropdown menu - is it possible to add a parameter in this file to give the CMS user an option to add/delete fields?

My preliminary research has lead me here: https://help.shopify.com/themes/development/theme-editor/settings-schema which sadly doesn't indicate that there is an add/delete feature for textareas but was curious if anyone here has done a workaround for this.

Ad

Answer

Further investigation reveals that a section needs to be created, and you need to use blocks.

https://help.shopify.com/themes/development/theme-editor/sections#blocks

Ad
source: stackoverflow.com
Ad