Custom Fields

Custom Fields

Within Qik we don't recommend creating new content types to represent people. The platform goes to great lengths to make it easy to store up to date information with integrity and aims to have a single profile to represent a single person in reality.

With that being the case, Profiles are a prime candidate to use the Custom Fields feature so that you can define, validate and store rich data and additional information on a profile.

To define a new set of custom fields, visit the Custom Fields panel here:
https://app.qik.dev/content/detail

Then click New Custom Fieldset .

Here you can select the source type, which is the type of content you want to add augment with custom fields, and set a database key. This key is important as it will be where the data is appended onto each data object. You can usually leave it as the default key that will be automatically generated from the title of your custom fieldset.

You can proceed to edit the fieldset and define your fields using the Field Editor in the same way that you add fields to your own custom content types.

When you create or edit a profile these custom fields will now be presented allowing you to add the relevant data to the new record. Expressions and validation included.

Validation

Validation will be automatically applied as per the configuration of your fields, This means that if you add rules that require an answer to be supplied for that field, users will be unable to create the source items without providing a valid answer. For example, let's say that we add a custom field Favorite Color to our Profile items that requires a minimum answer of 1. This would mean that whenever a user attempts to create a new Profile, they must provide an answer to `Favorite Color` or be presented with an invalid request error from the API.

Data

Each record in the database includes a data property, this property is where all custom field input is stored. The Key of the Custom Fieldset itself and then the appropriate key of the field with the input.