The Component Schema Field Object
Retrieve an object of the component fields schema.
Every field type added to a component can include a set of properties, but some are only available in specific types, such as Blocks or Date/Time.
The example includes only a few of the available properties.
Properties
Section titled “Properties”- type string
The type of the field
- required boolean
Default:
false. Define the field as mandatory. - description string
The description shown in the editor
- tooltip boolean
Default:
false. Set totrueto show the description as a tooltip. - pos number
Position of the field in the component
- translatable boolean
trueif translation is enabled - default_value string
Default value of the field. Can be an escaped
JSONobject - display_name string
Name displayed in the content editor
- maximum number
(for
Blocksfield) Maximum number of components allowed inside - minimum number
(for
Blocksfield) Minimum number of components allowed inside - restrict_type string
(for
Blocksfield) Restrict the type of components allowed inside bytags,groups(folders), or component names. - restrict_components boolean
(for
BlocksandRichtextfields) Default:false. Restrict the nestable component option. - component_whitelist string[]
(for
Blocks,Link, andRichtextfields) An array of content type block names. For example:\["post", "page", "product"\]. Only these components are allowed. - component_tag_whitelist number[]
(for
BlocksandRichtextfields) An array of tag IDs. Only components with these tags are allowed. - component_group_whitelist string[]
(for
BlocksandRichtextfields) An array of group UUIDs. Only components that belong to these groups are allowed. - no_translate boolean
(for
Textandnumberfields) Exclude from translation export - rtl boolean
(for
Markdown,Text, andTextareafields) Enable global RTL for the field - regex string
(for
Textfield) Client Regex validation for the the field - max_length number
(for
Markdown,Text, andTextareafields) Set the maximum length of the input string - style_options object[]
(for
Richtextfield) Objects containing data about custom CSS set inside the field.Show child properties
- _uid string
UUIDof the style - name string
Name of the style (displayed in the UI)
- value string
Value of the style
-
- customize_toolbar boolean
(for
MarkdownandRichtextfields)trueif customization of toolbar is enabled - toolbar string[]
(for
MarkdownandRichtextfields) Array containing the value of enabled items while customizing the toolbar - allow_target_blank boolean
(for
LinkandRichtextfields) Allow links to open in a new tab - allow_custom_attributes boolean
(for
LinkandRichtextfields) Enable custom attributes in links - rich_markdown boolean
(for
Markdownfield) Enable rich markdown view - allow_multiline boolean
(for
Markdownfield) Enable empty paragraphs - min_value number
(for
Numberfield) Minimum value allowed - max_value number
(for
Numberfield) Maximum value allowed - decimals number
(for
Numberfield) The number of decimal places that appear after the point - steps number
(for
Numberfield) The interval between numbers - disable_time boolean
(for
Date/Timefield) Default:false. Disable time selection in the date picker. - inline_label boolean
(for
Booleanfield) Display the field’s label next to the toggle - exclude_empty_option boolean
(for
Single-OptionandMulti-Optionsfields) Hide empty options in the UI - source enum
(for
Single-OptionandMulti-Optionsfields)Possible values Description undefinedSelf internal_storiesStories internalDatasource externalAPI endpoint in a datasource entries array internal_languagesThe languages enabled in the space - options object[]
(for
Single-Option,Multi-Options, andPluginfields) Array of datasource entries. Relevant only whensourceisundefined(reference above).Show child properties
- _uid string
UUIDof the option - name string
Name of the option
- value string
Value of the option
-
- use_uuid boolean
(for
Single-OptionandMulti-Optionsfields) Default:true. Relevant only whensourceisinternal_stories(reference above). - datasource_slug string
(for
Single-Option,Multi-Options, andPluginfields) Define selectable datasources. Relevant only whensourceisinternal(reference above). - external_datasource string
(for
Single-OptionandMulti-Optionsfields) Define external datasourceJSONURL. Relevant only whensourceisexternal(reference above). - folder_slug string
(for
Single-Option,Multi-Options, andReferencesfields) Filter the selectable stories path. Relevant only whensourceisinternal_stories(reference above). With a multilingual folder structure, add the{0}placeholder to adapt the path dynamically. For example,{0}/categories/. - max_options string
(for
Single-Option,Multi-Options, andReferencesfields) Maximum selectable options - min_options string
(for
Single-Option,Multi-Options, andReferencesfields) Minimum selectable options - filter_content_type string[]
(for
Single-OptionandMulti-Optionsfields) An array of selectable content types. Relevant only whensourceisinternal_stories(reference above). - entry_appearance string
(for
Single-Option,Multi-Options, andReferencesfields) Select if an option appears aslink(default) orcard. Relevant only whensourceisinternal_stories(reference above). - allow_advanced_search boolean
(for
Single-Option,Multi-Options, andReferencesfields) Allow editors to perform advanced search in a modal window - is_reference_type boolean
(for
Referencesfield)trueif theMulti-Optionsfield is aReferencesfield - filetypes string[]
(for
AssetandMulti-Assetsfields) Array of file type names. For example:\["images", "videos", "audios", "texts"\]. - asset_folder_id number
(for
AssetandMulti-Assetsfields) Numeric ID of the selected asset folder - allow_external_url boolean
(for
AssetandMulti-Assetsfields) allow external URLs - email_link_type boolean
(for
Linkfield) Default:false. Allow emails. - asset_link_type boolean
(for
Linkfield) Default:false. Allow assets. - show_anchor boolean
(for
Linkfield) Default:false. Enable anchor field for internal links. - restrict_content_types boolean
(for
Linkfield) Restrict the content type - force_link_scope boolean
(for
Linkfield) Default:false. Restrict access to folders. - link_scope string
(for
Linkfield) Default:false. Filter the selectable folders whenforce_link_fieldsistrue. - keys string[]
(for
Groupfield) An array of field keys - field_type string
(for
Pluginfield) Name of the custom field type plugin - required_fields string
(for
Pluginfield) Comma-separated required fields - image_crop boolean
(for deprecated
Imagefield) Activate force crop for images - keep_image_size boolean
(for deprecated
Imagefield) Keep the original image size - image_width string
(for deprecated
Imagefield) Define image width in pixels or width ratio ifkeep_image_sizeistrue - image_height string
(for deprecated
Imagefield) Define image height in pixels or height ratio ifkeep_image_sizeistrue - add_https boolean
(for deprecated
ImageandFilefields) Prependshttps:to disallow the relative protocol - can_sync boolean
Default:
false. Advanced usage to sync with the field in preview. - exclude_from_merge boolean
(requires the Dimensions App) Exclude merging
- exclude_from_overwrite boolean
(requires the Dimensions App) Exclude overwriting
- force_merge boolean
(requires the Dimensions App) Overwrite when merging
- conditional_settings object[]
Array containing an object with information about conditions set on the field
"title": {"type": "text","pos": 0,"translatable": true,"required": true,"regex": "","description": "Description for the field","display_name": "","default_value": "","can_sync": false,"rtl": false,"no_translate": false}Get in touch with the Storyblok community