Manage Fieldsets easily with the JSON Fieldset Module

shadybar
esod
One of the more complex user interface issues yet to be solved is to provide groups of fields to the content manager while maintaining a sound data model. These groups of fields would generally be described as meta data for the content object being curated, and do not serve any purpose outside of the context of its parent object.

This can most clearly be described with a slider carousel. You may have the fields: title, image, caption, click to action URL and text. From a relational data perspective, this is actually just one data point, but we need to present the fields as separate UI elements to make content management a good experience.

Even though there are other modules that solve this UI problem in Drupal, each field still gets its own data and revision tables in the database. This makes integration with node access modules and writing queries more difficult. For example, complex queries are needed to get the correct revisions of the fields when previewing or adding workflow to content.

The Json Fieldset module creates one textfield in the database and supplies a field widget containing the actual slider fields from our earlier example. These fields do not get their own tables in the database, and on submit, the fields get parsed into a Json string and inserted into the database as if it was just a regular string in a text field.

Through the use of field formatters, theme hooks, and template files, along with the natural integration with views, workbench, et cetera, managing data for these field groups is just like managing a single text field with any amount of cardinality.

Join this session to learn about how to manage Fieldsets easily with the Json Fieldset Module.
 
 

Session Track

Coding and Development

Experience Level

Advanced

Drupal Version