Skip to content

SuperTable

spAnser edited this page Apr 19, 2016 · 9 revisions

SuperTable requires a little extra structure to function, but can be used to configure the SuperTable in both a field and as a field in a Matrix block.

{
  "fields": [
    {
      "name": "SuperTable",
      "handle": "superTable",
      "instructions": "This is not a required field.",
      "type": "SuperTable",
      "typeSettings": {
        "maxRows": 3,
        "blockTypes": {
          "new": { // SuperTable requires this object to configure properly.
            "fields": { // SuperTable requires this object to configure properly.
              "new1": {
                "name": "Row 1",
                "handle": "row1",
                "type": "PlainText"
              },
              "new2": {
                "name": "Row 2",
                "handle": "row2",
                "type": "RichText"
              },
              "new3": {
                "name": "Row 3",
                "handle": "row3",
                "type": "Assets",
                "typesettings": {
                  "limit": 1,
                  "selectionLabel": "Select an Image"
                }
              },
              "new4": {
                "name": "Row 4",
                "handle": "row4",
                "type": "Entries",
                "typesettings": {
                  "limit": 1,
                  "selectionLabel": "Select an entry"
                }
              }
            }
          }
        }
      }
    }
  ]
}
Clone this wiki locally