Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save skorasaurus/f4b295e73768114f9a851b8da4746a98 to your computer and use it in GitHub Desktop.
Save skorasaurus/f4b295e73768114f9a851b8da4746a98 to your computer and use it in GitHub Desktop.
example JSON structure, schema for https://gitlab.com/cpl/cpl-libcal-block
{
"key": "group_60db5bd86d803",
"title": "ACF Libcal Block",
"fields": [
{
"key": "field_60db5be9ca88f",
"label": "Days In Advance To Show",
"name": "days_in_advance_to_show",
"type": "number",
"instructions": "number of days in advance of today to fetch events from the future.",
"required": 1,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"default_value": "",
"placeholder": 30,
"prepend": "",
"append": "",
"min": 1,
"max": 90,
"step": 1
},
{
"key": "field_60db5c99ca890",
"label": "Campuses (Branches)",
"name": "libcal_campuses",
"type": "checkbox",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"4604": "Main",
"4605": "Addison",
"4685": "Brooklyn",
"4686": "Carnegie West",
"4687": "Collinwood",
"4688": "East 131",
"4689": "Eastman",
"4690": "Fleet",
"4691": "Fulton",
"4692": "Garden Valley",
"4693": "Glenville",
"4694": "Harvard-Lee",
"4695": "Hough",
"4697": "Jefferson",
"4698": "Lake Shore",
"4606": "Langston Hughes",
"4699": "Lorain",
"4700": "MLK",
"4607": "Mem Nott",
"4804": "Mount Pleasant",
"5505": "OLBPD",
"5504": "PAL",
"4701": "Rice",
"4702": "Rockport",
"4703": "South",
"4747": "South Brooklyn",
"4704": "Sterling",
"4705": "Union",
"4608": "Walz",
"4707": "West Park",
"4609": "Woodland"
},
"allow_custom": 0,
"default_value": [],
"layout": "horizontal",
"toggle": 1,
"return_format": "value",
"save_custom": 0
},
{
"key": "field_60dc8dcf8e96c",
"label": "Event Categories",
"name": "libcal_event_categories",
"type": "checkbox",
"instructions": "Select which categories you want to return events for (leave this empty will return all events, including those without a category)",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"43193": "Art",
"43195": "Author Visits",
"43197": "Book Discussions",
"37983": "Book Discussions (Get Graphic)",
"42434": "Book Discussions (Think and Drink)",
"43201": "Computer Training",
"43249": "CPL Play",
"43208": "Music",
"43984": "Storytime",
"43214": "Summer Reading Club"
},
"allow_custom": 0,
"default_value": [],
"layout": "vertical",
"toggle": 1,
"return_format": "value",
"save_custom": 0
},
{
"key": "field_60eef758f952f",
"label": "Internal Tag",
"name": "libcal_internal_tags",
"type": "checkbox",
"instructions": "",
"required": 0,
"conditional_logic": 0,
"wrapper": {
"width": "",
"class": "",
"id": ""
},
"choices": {
"1287": "Featured Event"
},
"allow_custom": 0,
"default_value": [],
"layout": "vertical",
"toggle": 0,
"return_format": "value",
"save_custom": 0
}
],
"location": [
[
{
"param": "block",
"operator": "==",
"value": "acf\/cpl-libcal-block"
}
]
],
"menu_order": 0,
"position": "normal",
"style": "default",
"label_placement": "top",
"instruction_placement": "field",
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1626282147
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment