Switch Field
A true or false switch. Good for components that can be turned on/off on a by-page basis such as page sections.
Settings
Basic
Name
: The human-friendly name of this field.Data Key
: The field name in published data. It must be in UpperCamelCase.Description
: The description of this field, should be a human-friendly text shown for content editor.Hidden
: Hide this field from the template. Used to create document with hidden default values. It is recommended that put this field to bottom.
Display
True text
: The display text for this field while it is on.False text
: The display text for this field while it is off.
Default
The default value of this field when create a new document based on this template.
Publish
Data Key
is set as showLogin
and switch on this field.
JSON data
The value of this field will be published as a boolean
.
{
"showLogin": true
}
GraphQL API
The value of this field will be published as a boolean
.
{
"showLogin": true
}