facebook youtube pinterest twitter reddit whatsapp instagram

The Field Module

In this guide, I would introduce the Field Module which is the engine powering the data fields in Tonics, let's get to it...

In Tonics, a field is a data structure for holding data, what data a Field might allow depends on the Field itself, meaning we also have several types of Field, for example, we can have a Field Type Text which can also have different text types e.g (text, number, URL, email, etc).

You'll usually be using more than one Field, in that case, I'll say you are composing several Fields to form a structure of a larger whole in relation to an entity, this would usually be called Records since it is more or less a grouping of Fields, I'll love to call this a component but to avoid confusion, let's stick to Record.

So, again, Field is a structure for holding data, and when we have a grouping of Fields that is relevant to a certain entity, we call it a Record. We can also have Fields that are nested and even Fields that can refer to themselves, more like a foreign key kinda relationship, but let's take it a step at a time, would get to that in a bit.

Having got a basic understanding of a Field, let me introduce you to some of the major ones:

Note: Fields are grouped into categories, so, the list would be in a category relationship


The inputs house several Fields such as Text, Range, Choice, Date, Rich Text, Select & Color

Here is a quick demo:


The Media category is self-explanatory, we use it to hold media files URL, e.g, audio, an image, or any generic files, below is a quick demo:


The Modular is one of the most advanced parts of the Field Builder from the code perspective, it looks really simple for you as an end-user so it is easy to use for users, I won't go through adding the Field because the Modular category is a huge article on its own, nevertheless, here is a demo of the SEO Section built with the Modular Fields coupled with other Fields (Input, Media, etc):

Note: The Modular Category is where you can build a foreign relationship, or more like a combination of Fields that can be used to establish or enforce a link between other Field Items. The updating of fields would automatically be taken care of.

The Modular Fields has a lot of use cases, in the above video, take a look at the Structured Data tab of the SEO Settings, I am integrating different types of structured data, the selection contains Fields of Group Items which can also contains Fields of Items.


There are other Field Categories, like Tools, Menu, Widget, and others. The concept is similar to the ones above, so, I'll let it slide as this is more like an introduction article, so, see you later.