Event types allow you to define additional fields that can be filled in when creating events. For example, team logos for sports events or artist names for music festivals. The anatomy of an event type is simple. Groups and fields. A group is exactly that. It’s a group containing fields. A field is the piece of information you want to save in your event. Each field have a type, name, placeholder and a default value. You can also specify whether a field must be filled in when creating events. How are event types used? Create an event and select the desired event type to expose the additional fields to be captured.
The additional fields can be found when creating an event, but first, we have to set up the event type with its fields.
Visit the events section and click the "Event types" tab in the menu. Then click Create to start.
Give your event type a unique title. In most cases, the title would represent the type of event you are streaming, rather than describing the type of information you want to capture.
Next, you have to define the fields you want to capture when creating an event. In MCLS, these fields are always grouped together. Do not worry if you don't have a requirement for multiple groups. Grouping is only used to organise your fields, and will not change how you interact with the form when creating events.
There is no limit to the number of groups you can create. How you organise your fields are up to you.
Once you've named your group, it's time to start adding fields. Each field has a couple of options:
Field type: This defines the type of information you want to capture. For example, text, numbers, dates etc. MCLS will use this type to ensure the correct format is entered.
Title: This is the label that will describe to the user what information they need to enter. This will appear on top of the input field.
Placeholder: The placeholder is help text that appears inside of the form, providing some guidance to the user. This guidance could be the format or an example of the information.
Default value: The default value is copy that will pre-filled into the field when the form is displayed. The user can remove or replace this value.
Required field toggle: This option stipulates whether a field must be completed before the form will be saved. MCLS will show an error message when the user tries to create the event with fields that are required, but not filled in.
To add multiple fields to a group, click the "Add field" button and complete the required options. As per groups, there is no limit to the number of fields you can add to an event type.
You can test your event types by creating a new event, and selecting your new type in the "Event type" select box. Once selected, the additional form fields will appear on the page.