Super Table is a Craft CMS field type to allow you to create powerful tables. You can utilise all your favourite native Craft field types in your tables, including Assets, Users, Entries and even Matrix. Also supports many third-party field types.
Editing a Super Table is very similar to editing a Table. You define your columns, giving them a Name and Handle, and now have the option to select any installed field type.
To edit the settings of a particular field, click on the small 'cog' icon on the far right of the table row. This will open a modal window where you can edit any settings for that field type. Don't forgot to hit Save button to save these field settings!
Craft
- Assets
- Categories
- Checkboxes
- Color
- Date/Time
- Dropdown
- Entries
- Lightswitch
- Matrix
- Multi-select
- Number
- Plain Text
- Position Select
- Radio Buttons
- Rich Text
- Table
- Tags
- Users
Third-Party
...and many more. Super Table can handle just about any FieldType, the above are simply those that have been tested.
For any Super Table, you can choose between two layout options - Row and Table. This is an option when creating your Super Table field. The Table layout will present fields vertically and in a tabular format - exactly as you'd expect from a Table field. Row on the other hand will present fields horizontally, similar to how a Matrix field works.
Which layout you choose will likely depend on what sort of fields you have in your Super Table, and the number of fields. For a Super Table containing 4 or more fields, your best option is to use the Row Layout.
To illustrate the different layout options, refer to the below, which are the same field using both Table and Row layouts.
The Row Layout also shines brightest when using inside a Matrix field as below.
A Super Table field can be set to be static, which turns the field into a non-repeatable collection of fields. This can be useful for a multitude of cases where you wish to simply group a collection of fields together, and not necessarily have them repeatable.
- Test more third-party fieldtypes, purely for a complete list.
- Add ability to collapse rows.
- New settings layout, including drag/drop, full control over field layout. Allows you to set out the field exactly as you like.
- Add template hook to allow other plugins to provide layouts for editing field.
- Allow for SuperTable-in-SuperTable - because why not.
- Support column duplication in SuperTable field settings.
Below are major release notes when updating from one version to another. Breaking changes will be listed here.
As a rule of thumb, a Super Table field acts almost identically to a Matrix field, so templating and custom development should be similar to a Matrix field. Below are a few resources for developers.
- Templating examples
- Updating a Super Table field from a front end form
- Fetching content from a Super Table field via plugin
- Programatically saving a Super Table field with content via plugin
Errors or trouble saving Matrix / Super Table combination
If you're using a Matrix / Super Table combination, you'll likely need to alter the max_input_vars
and post_max_size
setting in your php.ini
file. Whether this is a necessary change depends on your server setup, but its advised that you make this change regardless to ensure data isn't lost. This will ensure your fields save correctly, and data is not lost. You may experience a 500 error on save, or a semi-blank screen when saving your content. This can also be a common problem with Matrix and other fields - see http://craftcms.stackexchange.com/a/2777.
Thanks go to @brandonkelly and @benparizek for their input, ideas and suggestions.
- Craft 2.3.2615+.
- PHP 5.4+