Fields

Fields

Brezel TypeColumn Type (Laravel)options.fieldsoptions.referencesoptions.modeoptions.values
checkboxboolean--switch-
choicestring--select;buttons;radioValues[]
clientstring----
codelongText----
colorstring----
currencyspecial_number----
datedate----
monthdate----
dateRangejson----
datetimedateTime----
emailstring----
file--module_indentifier e.g. "files"--
incrementingspecial_incrementing----
layoutlongText----
linkstring(2048)--table;tabs-
list-Fields[]---
multiselect--module_indentifier--
numberspecial_number----
rangestring----
ratingspecial_rating----
select--module_indentifier--
signaturelongText----
telstring----
textstring----
textarealongText----
timetime----
uniqidstring----
upload--module_indentifier e.g. "files"--
weekstring----
wysiwyglongText----

Optional Keys for Fields

  • recipe: calulation for field value (eg. field_identifier + field_identifier)
  • options: Array (filled with options from the list below)

Field Options

  • autofocus: boolean
  • allow_clear: boolean [dateRange, choice(mode = select)] whether input clearable (default: true)
  • copyButton: boolean [text] whether to display a copy button
  • copyTemplate: boolean [text] contains template string to modify the copy value. e.g. “prefix {{value}} suffix”
  • column_width: string
  • decimal_digits: int [currency, number]
  • default: value (for date value NOW)
  • enable_search: boolean (used by type choice mode select) whether input search is possible (default: true)
  • with: array (which relations inside a relation will be loaded)
  • display_as_icon_in_table: boolean
  • events: Object (to trigger Workflows etc)
  • fields: Array (used by type list)
  • frontend_disabled: boolean (disables the input, but allows value changes by the api)
  • help: boolean
  • hidden_from_frontend: boolean (hides the field completely)
  • hideSearch [select] if true, this option hides the search button which would open a resource table
  • hide_value [text] (does not show the value when viewing the field but can still be edited as cleartext)
  • ignore_when_empty: boolean
  • incrementing_default: int
  • incrementing_format: String
  • maxlength: int (set input length / for password and text fields)
  • mode: String (used by types choice, checkbox and list)
  • multiple: boolean (field_type: upload)
  • no_filter_in_entity_table: boolean
  • no_sorter_in_entity_table: boolean
  • no_title_in_entity_table: boolean
  • readonly: boolean (makes the field fully readonly for frontend and api. Use frontend_disabled if you just want a disabled input field)
  • recipes: recipes list for options
  • references: reference (setting_helper_module for Helper Module references)
  • rules: (eg. required; we support nearly all laravel validations )
  • seo_only: boolean (legacy) (used by type wysiwyg, displays only ‘general’ options)
  • show_in_export: boolean
  • show_in_resource_table: boolean
  • sort: boolean [select, multiselect] sorts elements in dropdown alphabetically
  • sortField: String [select, multiselect] sorts elements in dropdown based on this field
  • sortOrder: "asc"|"desc" [select, multiselect] defines sort order of elements in dropdown
  • source: String (used by type choice, currently is only value “countries” possible)
  • toolbar: Array<String> (used by type wysiwyg, toolbar will only show items listed in this array)
  • toolbar_preset: String (use a predefined toolbar preset, e.g. “seo_only”)
  • values: Array (used by type choice)
  • show_as_iframe: boolean (used by types link and wysiwyg) whether to show field content in an iframe
  • validationState: 'warning' | 'error' | 'validating' | 'success' | null used to display custom errors, use with validateMessage, submit validation will be shown first (see ant docs )
  • validateMessage: String Message being displayed when a validationState is set
  • no_paragraphs: String (used by wysiwyg) Disables standard behaviour and wraps all text nodes in <div> instead of <p>
  • minute_step_length : int (used by datetime) This option forces the entered time into the defined minute interval by rounding and limits the choices in the picker as such.

Option value can be static or calculated with recipe. There are cases when recipes are long (for example for styles definition), then better to move them to separate file

Example :

{
  "identifier": "some_field",
  "type": "text",
  "options": {
    "style": "${trimFile('recipes/fieldStyle.recipe')}"
  }
}

Example 2 (show or hide file field depending on show_file checked or not) :

{
  "identifier": "attached_file",
  "type": "file",
  "options": {
    "hidden_from_frontend": true,
    "recipes": {
      "hidden_from_frontend": "!show_file"
    },
    "references": "files"
  }
}

Location Autocomplete for Text Field

  • type: string (location or list) Location autocomplete actually not allowed!
  • input: object
    • country: string reference to a field to optimize the search (Example: field_country / value: “Germany”) (optional)
  • output: object
    • city: string name of a text field to place the search city result in (optional)
    • zip: string name of a text field to place the search zip code result in (optional)
    • region: string name of a text field to place the search region result in (optional)
  • values: array entries for autocomplete
  • recipes: object recipe function for values
    • values: string / recipe like x = y ? x : y
{
  "identifier": "address_street",
  "type": "text",
    "options": {
      "autocomplete": {
        "type": "location",
        "input": {
            "country": "address_country"
        },
        "output": {
          "city": "address_city",
          "zip": "address_zip",
          "region": "address_region"
        }
      }
  }
}
{
  "identifier": "example_text",
  "type": "text",
    "options": {
      "autocomplete": {
        "type": "list",
        "recipes": {
          "values": "language == 'german' ? ${trimFile('recipes/de.recipe')} : ${trimFile('recipes/en.recipe')}"
        }
      }
  }
}

List options

  • item_width: string (eg. 300px)
  • show_ordering: boolean
  • show_handle: boolean
  • title_field: String (for tabs: field identifier that is used as tab title)
  • closable: boolean (for tabs)

Options for Fields in Lists

  • list_item_max_width: string (eg. 300px)
  • list_item_min_width: string (eg. 200px)
  • align_buttons_left: boolean (moved add and delete buttons to the left)

Select options

  • related_entries_load_limit: int no limit: -1
  • showMode: String can be set to table
  • table_select: boolean show/hide the search icon for the table select (default: true)
  • add_options: boolean show/hide the options-add button (default: false)
  • edit_options: boolean show/hide the options-edit button (default: false)
  • filters: Array allows to pre-filter select and multiselect options. Example of use:
"filters": [
    {
        "column": "type",
        "operator": "LIKE",
        "value": "Lieferant"
    }
]

Marking required fields as such

To append a star to the field name of required fields, the field group containing the fields needs to have the option

  • mark_required_fields: true
{
    "type": "field_group",
    "options": {
        "mark_required_fields": true,
        "fields": [
            "owner",
            "brand_label"
        ]
    }
}

Show field labels above combined fields (Vue 3)

Displays the label above combined fields. The main label identifier is combined_firstfieldname

  • show_combined_fields_label: true
{
    "type": "field_group",
    "options": {
        "show_combined_fields_label": true,
        "fields": [
            [
              "name",
              "last_name"
            ]
        ]
    }
}