---



common_definitions:
    stringy: &stringy
        - number
        - string
    booly: &booly
        - boolean
        - string
    variable: &variable
        - boolean
        - number
        - string
        - "null"
    css_class: &css_class
        type: string
        show_by_default_in_editor: true
        description: A CSS class name to add to this element.
    ord: &ord
        type: *stringy
        description: >
            This controls the order in which elements are drawn on the screen.
            
            If not set, it defaults to the order the CMS finds them in.
            
            From version 10.1 onwards, we have some logic where you can place a field or a button
            immediately before or after an existing field or button using an offset.
            To do this you need to use a pattern like this: "field_name + 0.1" (to put your field after)
            or like this: "field_name - 0.1" (to put your field before).
    copy_of: &copy_of
        type: string
        description: >
            You can enter the code-name of another element (this must be element with the same
            parent element) to copy the properties from.
            
            Any other properties you set will override the copied properties.
            
            If the element that you are attempting to copy is missing, unset, or not yet loaded,
            then your element will be removed.
            
            This works from version 8.0 onwards.
    hidden: &hidden
        type: boolean
        description: >
            The hidden property hides elements from view when <code>true</code>.
    visible_if: &visible_if
        type:
            - string
            - object
        description: >
            A snippet of JavaScript code to be evaluated.
            
            From version 7.5 onwards, to avoid using an inefficent eval(), you can also call a function
            by using an object of the form:
                lib.methodName => arg1, arg2, arg3, ...
            
            The visible_if property hides elements from view if the code provided does not evaluate to <code>true</code>.
            
            See https://zenar.io/visibility-in-tuix for examples.
    disabled_if: &disabled_if
        type:
            - string
            - object
        description: >
            A snippet of JavaScript code to be evaluated.
            
            From version 7.5 onwards, to avoid using an inefficent eval(), you can also call a function
            by using an object of the form:
                lib.methodName => arg1, arg2, arg3, ...
            
            If the code provided evaluates to <code>true</code> the button will be disabled.
            
            See https://zenar.io/visibility-in-tuix for examples.


$schema: 'http://json-schema.org/draft-04/schema#'
title: Front-end Administration Schema

type: object
additionalProperties:
    title: Front-End Administration
    type: object
    required:
        - fea_type
    anyOf:
        -
            required:
                - columns
        -
            required:
                - key
                - tabs
    properties:
        fea_type:
            enum:
                - form
                - list
                - dash
                - graph
            description: >
                You should set this property to either form, list, dash or graph - depending on which type of FEA plugin
                you are writing.
                
                You must set this, otherwise your FEA plugin will not do anything.
                
                This property must be written in your .yaml file.
                It can't be changed in php.
                
                You may also need to clear the site cache and do a browser reload if you've just changed it but
                your changes are not yet appearing.
                
        microtemplate:
            type: string
            description: >
                The name of the microtemplate to use to display this data.
                
                If you don't set this, it will be set to a default value depending on the
                value of the fea_type property you've used.
                'fea_form' is the default for FEA form plugins,
                'fea_list' is the default for FEA list plugins,
                'fea_graph' is the default for FEA graphs plugins,
                and finally FEA dash plugins have no default value as they require you
                to write your own custom microtemplate.
                
                FEA list plugins have two other options for their microtemplate built in to the core.
                'fea_list_blocks' will show each item as a block.
                'fea_list_transposed' shows items in a table with each item displayed vertically instead of horizontally,
                and each field displayed horizontally instead of vertically.
        
        title:
            type: string
            description: >
                The title for the plugin, to be placed in a h1 tag (or, if in use,
                the tag specified in the <code>title_tags</code> property).
                
                If you do not specify this property, the h1 will be hidden from view.
        
        use_merge_fields_from_request_vars_in_title:
            type: boolean
            description: >
                Set this to true to enable using merge fields from variables in the request in the title and subtitle.
                (The format used for the merge fields is the same as the format used in the slide labels.)
                
                This property will only take effect if you call $this->applyTitleSetting() in your fillVisitorTUIX() method.
                
                This works from version 10.2 onwards.
        
        title_for_existing_records:
            type: string
            description: >
                When showing a form, this property will be used instead of the title when editing an existing record.
                
                (The toolkit will consider that you are editing an existing record if the $tags['key']['id']
                 variable is set.)
                
                You can also use merge fields from the fields on the page, e.g.: Editing the animal "[[name]]".
                
                As of version 8.7, you can also include variables from the key.
        
        title_tags:
            type: string
            description: >
                The HTML tag to be used for the title.
                If you do not specify this property, the h1 tag will be used.
        
        header_html:
            type: string
            description: >
                Use this for FEA lists to add some custom HTML at the top of the plugin
                before the title.
        
        body_html:
            type: string
            description: >
                Use this for FEA lists to add some custom HTML after the title but before
                the list.
                
                This works from version 9.4 onwards.
        
        footer_html:
            type: string
            description: >
                Use this for FEA lists to add some custom HTML at the bottom of the plugin
                after the list.
        
        no_items_message:
            type: string
            description: >
                When viewing a list, this mesage will be shown when there are no items.
                Note: This uses HTML text, not plain text.
        no_items_in_search_message:
            type: string
            description: >
                A message to display when there are no items in a search.
                Note: This uses HTML text, not plain text.
        use_merge_fields_from_request_vars_in_items_message:
            type: boolean
            description: >
                Set this to true to enable using merge fields from variables in the request
                in the no_items_message and no_items_in_search_message properties.
                (The format used for the merge fields is the same as the format used in the slide labels.)
                
                This property will only take effect if you call $this->applyTitleSetting() in your fillVisitorTUIX() method.
                
                This works from version 10.3 onwards.
        
        key:
            type: object
            properties:
                id:
                    type: *variable
                    modified_by_cms: true
                    description: >
                        The id key for this form.
                        
                        If you are saving a newly created item, you should populate the id
                        yourself as soon as you know what it is.
            additionalProperties:
                type: *variable
                description: >
                    A variable or meta-information that you define about this form.
            description: >
                The key of an form lets you receive and/or store meta-information and variables.
        
        show_overlay_layer:
            type: boolean
            description: >
                Whether to show an overlay div under the form.
        
        css_class: *css_class
        table_css_class:
            type: string
            description: A CSS class name to add to the table used for FEA lists.
        
        always_visible_cols:
            type: number
            description: >
                This automatically sets the "zfea_always_visible" CSS class on the first n columns,
                where n is the number you enter.
        
        item_count_message:
            type: string
            description: >
                A message like "[[count]] items" which will show the number of items in a list.
                Will only show when there is more than 1 item.
        
        scroll_after_save:
            type: boolean
            description: >
                Whether this plugin should scroll to the top of the slot after saving.
        
        scroll_to_top_of_slot_on_format_or_validate:
            type: boolean
            description: >
                Whether this plugin should scroll to the top of the slot on a "format" or "validate" event.
        
        tab:
            type: *stringy
            modified_by_cms: true
            description: >
                Forms are divided up into sections called "tabs".
                
                Your form must have at least one tab. If you have multiple tabs, you can only display one at a time.
                
                You should enter the code-name of the tab you wish to display into this property.
            default: (the first tab of the form)
        
        tabs:
            type: object
            description: >
                Forms are divided up into sections called "tabs".
                
                Your form must have at least one tab.
                
                If you wish to create a multi-stage form, you can use multiple tabs, one per stage of the form.
            
            additionalProperties:
                type: object
                required:
                    - fields
                properties:
                    ord: *ord
                    copy_of: *copy_of
                    
                    errors:
                        type: object
                        html_description: |
                            <p>You can set errors&nbsp;using your <code>validateAdminBox()</code> method to show that there are errors on a tab.</p>
                            <p>If edit mode is enabled for a tab, an Admin will not be able to leave that tab or save the form whilst there are errors on that tab.</p>
                            <p>The CMS will automatically initialise the <code>errors</code> property to an empty array each time the tab is validated. This means that any errors from a previous validation will be cleared and must be re-added if the error is still present.</p>
                        additionalProperties:
                            type: string
                            description: >
                                An error message to show.
                    notices:
                        type: object
                        html_description: |
                            <p>Notices display like errors, but do not have any special functionality.&nbsp;If visible, they are displayed one after the other just below the error messages on a tab.</p>
                            <p>The CMS never automatically sets or removes them, and a notice will not stop an Admin from leaving a tab or saving.</p>
                        additionalProperties:
                            type: object
                            required:
                                - type
                            dependencies_if_true:
                                show:
                                    - message
                            properties:
                                show:
                                    type: boolean
                                    description: >
                                        The notice will only be shown if this is set.
                                        
                                        From version 8.4 onwards, you can also use the visible_if property to control whether the notice is displayed,
                                        however the show property must still be set to true otherwise the notice will not display.
                                visible_if: *visible_if
                                message:
                                    type: string
                                    description: >
                                        A message to show.
                                type:
                                    enum:
                                        - error
                                        - warning
                                        - question
                                        - success
                                    description: >
                                        The type of notice. A different styling will be applied for each different type.
                    
                    show_errors_after_field:
                        type: string
                        description: >
                            If you don't want the error messages displaying at the top of the tab,
                            you can set the name of a field here to display them below that field.
                            Note: the field after must start on a new line.
                    #disable_autofocus:
                    #    type: boolean
                    #    description: >
                    #        When a tab is displayed/redrawn/formatted, the CMS will try to focus on the
                    #        first field on that tab.
                    #        This is usually convenient, but can cause problems for tabs with scrollbars
                    #        as the browser will scroll to show the focused field.
                    #        You can disable this automatic focusing by setting this property.
                    
                    edit_mode:
                        type: object
                        description: >
                            The edit mode property controls whether the fields on a tab can be edited.
                            If edit mode isn't enabled, all of the fields will be read-only.
                        properties:
                            enabled:
                                type: boolean
                                description: >
                                    Whether this tab can be edited.
                            on:
                                type: boolean
                                modified_by_cms: true
                                description: >
                                    The CMS will automatically set this property when this tab is in edit mode.
                    
                    # The fields property here will be array_merge_recursive() with the fields property
                    # from admin_box_schema.yaml by the dev tools when this file is loaded.
                    fields:
                        additionalProperties:
                            properties:
                                confirm: &confirm
                                    type: object
                                    hide_in_editor: true
                                    description: >
                                        Use this to display a confirmation prompt before performing the button's action.
                                    properties:
                                        title:
                                            type: string
                                            description: >
                                                A title for the confirmation prompt.
                                        message:
                                            type: string
                                            description: >
                                                A message for the confirmation prompt.
                                        html:
                                            type: boolean
                                            description: >
                                                If this is set, the message will not be html-escaped.
                                        button_message:
                                            type: string
                                            description: >
                                                A message for the confirm button
                                        button_css_class:
                                            type: string
                                            description: >
                                                A css class for the confirm button
                                        cancel_button_message:
                                            type: string
                                            description: >
                                                A message for the cancel button
                                
                                pick_items:
                                    type: object
                                    description: >
                                        This is used to define fields that let the user pick things,
                                        e.g. from a typahead search.
                                    anyOf:
                                        -
                                            required:
                                                - enable_type_ahead_search
                                        -
                                            required:
                                                - allow_typing_anything
                                    properties:
                                        multiple_select:
                                            type: boolean
                                            description: >
                                                Setting this option will allow the user to enter multiple values.
                                                They will be stored as comma-separated values.
                                        enable_type_ahead_search:
                                            type: boolean
                                            description: >
                                                Set this to true to enable the typeahead search.
                                        
                                        allow_typing_anything:
                                            type: boolean
                                            description: >
                                                Allow the user to type anything into the box.
                                                This is useful if you wish to have a type-ahead that helps users pick
                                                existing things, but also be able to create something new by typing a
                                                name that doesn't yet exist.
                                        
                                        picked_item_microtemplate:
                                            type: string
                                            description: >
                                                Set this to override the microtemplate used to display the picked items.
                                        dropdown_item_microtemplate:
                                            type: string
                                            description: >
                                                Set this to override the microtemplate used to display the items in the
                                                dropdown for the typeahead.
                                        
                                        reorder_items:
                                            type: boolean
                                            description: >
                                                Setting this property will allow the administrator reorder the selected items by dragging/dropping.
                                                
                                                Otherwise items will be displayed in alphabetical order.
                        
        
        
        # The lovs property here will be array_merge_recursive() with the lovs property
        # from admin_box_schema.yaml by the dev tools when this file is loaded.
        lovs: {}
        
        phrases:
            type: object
            additionalProperties:
                type:
                    - string
                    - object
            description: >
                You can use this to define some phrases to use later in your JavaScript code.
                Anything you enter here will be translated.
                
                You can also nest objects in here (i.e. using arrays of arrays) and anything
                nested like this will also be translated.
        
        
        search_bar_placeholder:
            type: string
            description: >
                Use this to set some placeholder text on the search box
        search_button_message:
            type: string
            description: >
                The message on the search button, if a search button is shown.
                
                Defaults to &#xf002; if not set (which is the font-awesome magnifying-glass icon)
        subtitle:
            type: string
            description: >
                Use this to set a subtitle just above the list and after the search box.
        hide_search_bar:
            type: boolean
            description: >
                Use this to hide the search box
        hide_column_headings:
            type: boolean
            description: >
                Use this to hide the column titles
        hide_pagination:
            type: boolean
            description: >
                Use this to hide the pagination at the bottom of the list
        
        
        columns:
            type: object
            description: >
                If you are showing a list, you should define the columns you are using
                
            additionalProperties:
                type: object
                properties:
                    title:
                        type: string
                        description: >
                            A title for your column
                    #tooltip:
                    #    type: string
                    #    description: >
                    #        Lets you specify a tooltip for the column's header.
                    ord: *ord
                    copy_of: *copy_of
                    css_class: *css_class
                    hidden: *hidden
                    visible_if: *visible_if
                    
                    show_title_in_block_view:
                        type: boolean
                        description: >
                            Set this to display the column name in Block View.
                            Also works in Responsive mode on mobile devices.
                    
                    values:
                        type: object
                        description: >
                            The FEA list has support for lists of values (with real values as keys and display values as values).
                            
                            From version 10.3 onwards you can also use an object in the format "{label: 'My label'}", to be consistent
                            with the format used by TUIX forms.
                        additionalProperties:
                            type:
                                - number
                                - string
                                - object
                            properties:
                                label:
                                    type:
                                        - number
                                        - string
                                    description: >
                                        The display value
                    empty_value:
                        type: string
                        description: >
                            If a column is empty, show this text instead of a blank cell.
                    
                    show_multiple_values:
                        type: boolean
                        description: >
                            Set this properly if you want to show multiple values, separated by a comma.
                            This works from version 10.1 onwards.
                    
                    show_value_in_tooltip:
                        type: boolean
                        description: >
                            Set this properly if you want to show the value as a tooltip when the user hovers
                            their mouse over the column.
                            
                            You would use this if you wanted to use CSS to display an icon in the column, but
                            still give the user a wat to see the actual text value.
                            
                            Or another use would be if you were going to show a long bit of text that gets
                            cut off in CSS, so the user can still read the full value by hovering the mouse
                            over it.
                            
                            This works from version 10.3 onwards.
                            Currently it only works in list view, not block view.
                    
                    align_right:
                        type: boolean
                        description: >
                            Set this to align the values in a column to the right.
                    
                    sort_asc:
                        type: *booly
                        description: >
                            Set this to flag that your populateItemsOrderBy() method supports sorting
                            by this column (ascending).
                            
                            You can provide a string, e.g. "Name (A-Z)", or just set this to true.
                    sort_desc:
                        type: *booly
                        description: >
                            Set this to flag that your populateItemsOrderBy() method supports sorting
                            by this column (descending).
                            
                            You can provide a string, e.g. "Name (Z-A)", or just set this to true.
                    sort_desc_by_default:
                        type: boolean
                        description: >
                            If you use both the "sort_asc" and "sort_desc" properties for a column,
                            when the user first clicks it the sort will be ascending first, and they will
                            need to click a second time if they wish to sort descending,
                            
                            You can set this property to flip that order and sort descending on the first click.
                            Best used on "date" columns where the user might expect the most recent things first.
                    
                    html:
                        type: boolean
                        description: >
                            If this is set, the value of the column will not be html-escaped.
                            
                            Note: this is always assumed to be true when using a twig_snippet
                            or microtemplate.
                    
                    twig_snippet:
                        type: string
                        description: >
                            This allows you to enter some Twig code, that will be run on the server
                            to display the value of this column.
                    
                    microtemplate:
                        type: string
                        description: >
                            This allows you to enter a microtemplate (this can either be the code for the template,
                            or the name of a pre-defined template), that will be run on the client
                            to display the value of this column.
                    
                    convert_to_percentage_of_total:
                        type: boolean
                        description: >
                            If you enable this option, and the values in the column are numeric,
                            they will be totaled up then converted to a percentage of the total.
                            
                            Note this won't work on plugins that use pagination!
                    
                    parent:
                        type: string
                        description: >
                            Enter the code-name of another column here to make your column's value appear
                            inside the column you specify.
                            
                            If you also specify a title, then your title will appear in each row as a label.
                            
                            There's a limit of 2 levels; you can't have a column inside a column inside another column.
                    
                    visible_if_for_each_item:
                        type: string
                        description: >
                            If you're using the list-blocks microtemplate, columns can be hidden on a item-by-item basis.
                            (This can also be used on the regular list microtemplate, but only for columns that have parents.)
                            You can enter a snippet of JavaScript code to be evaluated for each item, to show the column conditionally for each row.
                    
                    hide_if_empty:
                        type: boolean
                        description: >
                            If you're using the list-blocks microtemplate, columns can be hidden on a item-by-item basis.
                            (This can also be used on the regular list microtemplate, but only for columns that have parents.)
                            You can set this property to only show a column if it is not empty.
                    
                    units:
                        type: string
                        description: >
                            This will add a label just after the value, intended to be for displaying
                            the units of the field.
                    
                    pre_value_microtemplate:
                        type: object
                        additionalProperties:
                            type: string
                        description: >
                            This allows you to enter a microtemplate (this can either be the code for the template,
                            or the name of a pre-defined template), that will be run on the client
                            to display some HTML just before the value of the column.
                            
                            This works from version 10.3 onwards.
                    pre_value_html:
                        type: string
                        description: >
                            Some HTML code to be placed just before the value of the column.
                            
                            This works from version 10.3 onwards.
                    post_value_html:
                        type: string
                        description: >
                            Some HTML code to be placed just after the value of the column.
                            
                            This works from version 10.3 onwards.
                    post_value_microtemplate:
                        type: object
                        additionalProperties:
                            type: string
                        description: >
                            This allows you to enter a microtemplate (this can either be the code for the template,
                            or the name of a pre-defined template), that will be run on the client
                            to display some HTML just after the value of the column.
                            
                            This works from version 10.3 onwards.
                    
                    mirror_field:
                        type: object
                        description: >
                            Warning - at the time of writing this is currently very experimental!
                            
                            This property is used some FEA plugins, where the base plugin interacts with columns added
                            by another plugin.
                            
                            To use this, your module MUST make the following tables with these exact names:
                                - document_data (for saving the value of every field except for multiple checkboxes-type fields)
                                - document_checkbox_values (for saving multiple checkboxes-type fields)
                            
                            Depending on which plugin is accepting the custom fields, you can use this to show extra fields in
                            a list, show extra fields in a view, edit extra fields in a create or an edit mode, or search on
                            extra fields in a search plugin.
                            
                            This works from version 10.1 onwards.
                        properties:
                            name:
                                type: string
                                description: >
                                    The code-name/column name of the column in the document_data table that you wish to add.
                                    
                                    Note that while multiple checkboxes-type fields won't actually have a column in the table,
                                    they still need a code-name as if they had one.
                                    
                                    Warning - if you wish to display your column value, the name needs to match the code name
                                    of the column. If you just wish to include the column in the search without displaying it,
                                    the name may be different to the code name.
                            values_source:
                                type: string
                                description: >
                                    Use this to load the list of values for a checkboxes/radios/select field, 
                                    or a field with a typeahead.
                                    The format used is the same as centeralised lists in datasets, i.e.:
                                        module_class_name::method_name
                            weighting_in_main_search:
                                type: integer
                                description: >
                                    If you want to create a mirror column and have it searched, there are currently
                                    two different supported ways to implement this.
                                    
                                    For a search that searchs on the specific column, you can add a field into the
                                    search box plugin with the appropriate options.
                                    
                                    However if you want your column to be included in the search using the main search
                                    box, then you can set this option.
                                    Currently this only works on varchar fields.
                                    
                                    You should enter a positive integer weighting to give the field. The extract has
                                    a weighting of 1, and you can adjust the weightings of the other fields relative to this.
                            
                            order_linked_documents_by_this_field:
                                type: boolean
                                description: >
                                    When showing documents in a chain, by default they're shown in ID order.
                                    
                                    In some situations it might be more logical to show then ordered by a specific
                                    field, e.g. if you have a date field. You can set this property
                                    on field to flag that you want the chain sorted by that field.
                            order_linked_documents_by_this_field_desc:
                                type: boolean
                                description: >
                                    Set this property if you're using the order_linked_documents_by_this_field
                                    property and want to sort in a descending order.
        
        list_groupings:
            type: object
            description: >
                You can define some list-groupings to display items in groups.
                
                This affects the sorting - items will be sorted by their grouping first, then their normal sort order.
            
            additionalProperties:
                type: object
                
                properties:
                    list_outer_grouping:
                        type: string
                        description: >
                            The code name of the outer-grouping that this belongs to, if using outer-groupings.
                    image:
                        type: string
                        description: >
                            The HTML of image for this grouping.
                    label:
                        type: string
                        description: >
                            A label for this group. Groups will be sorted by their label.
                    html:
                        type: string
                        description: >
                            Custom HTML to show after the label.
                    show_toggle:
                        type: boolean
                        description: >
                            Show a toggle button that shows/hides the contents of the grouping.
                            
                            Note: this is done using a simple hide/show in JavaScript, there's no AJAX
                            loading, and this feature won't help if the data shown is too numerous.
                    toggle_starts_open:
                        type: boolean
                        description: >
                            If this is set, the contents will be shown by default and pressing the toggle
                            will hide them.
        
        list_outer_groupings:
            type: object
            description: >
                If you want two levels of grouping, then you can define some outer-groupings,
                which wrap-around and group the normal groupings.
                
                Again this affects the sorting - items will be sorted by their outer-grouping first,
                then their grouping, then their normal sort order.
            
            additionalProperties:
                type: object
                
                properties:
                    image:
                        type: string
                        description: >
                            The HTML of image for this grouping.
                    label:
                        type: string
                        description: >
                            A label for this group. Groups will be sorted by their label.
                    html:
                        type: string
                        description: >
                            Custom HTML to show after the label.
        
        items:
            type: object
            description: >
                An array of data for the items in the list
            
            additionalProperties:
                type: object
                
                properties:
                    label:
                        type: string
                        description: >
                            When using the fea_list_transposed microtemplate, you can optionally set the label property
                            on each item to add a plain-text label for them.
                            (Does nothing when not using the fea_list_transposed microtemplate.)
                    list_grouping:
                        type: string
                        description: >
                            The code name of the list-grouping that this item belongs to, if using list-groupings.
                    row_class:
                        type: string
                        description: >
                            This property lets you add a CSS class name to the whole row for the item which
                            you can then style.
                            (Does nothing when using the fea_list_transposed microtemplate.)
                    cell_css_classes:
                        type: object
                        description: >
                            You can use this to give individual cells a css class by creating elements here with
                            the same element name as the columns.
                        additionalProperties:
                            type: string
                            description: >
                                A css class name for the item in the column with this element's name.
                    cell_tooltip:
                        type: object
                        description: >
                            You can use this to give individual cells a tooltip by creating elements here with
                            the same element name as the columns.
                        additionalProperties:
                            type: string
                            description: >
                                A tooltip for the item in the column with this element's name.
                    thumbnail:
                        type: object
                        description: >
                            If you're using the list-blocks microtemplate, it can support items with a thumbnail set.
                            You can use this object to set the src, width and height of the thumbnail for each item
                        properties:
                            src:
                                type: string
                                description: >
                                    The src of the image.
                            width:
                                type: string
                                description: >
                                    The width of the image.
                            height:
                                type: string
                                description: >
                                    The height of the image.
        
        sort_by:
            type: string
            description: >
                It's possible to have an FEA list and populate the results using pure PHP instead of MySQL.
                However if you have a FEA list that doesn't pull items from the database,
                then you won't be calling the populateItems() function or writing the populateItems... series of methods,
                and the sort order won't be defined.
                In this case you should set a column to sort by using this property.
                However 
        sort_desc:
            type: boolean
            description: >
                Set this property if you're using the sort_by property but want to show the items in descending order.
        
        map:
            type: object
            description: >
                You can use this to add a google map to a list plugin.
                For this to work, each item should have a latitude and longitude set,
                and you need a framework with <div>s roughly as follows:
                
                    <div id="map_{{containerId|e}}" style="height: 400px;"></div>
                    <div id="info_{{containerId|e}}" style="display: none;">
                        <div id="fea_{{containerId|e}}"></div>
                    </div>
                
                This will cause the normal list to be hidden, the items to appear on the map as pins,
                and the fulld details for each item to appear when you click the pins.
            
            additionalProperties:
                type: object
                
                properties:
                    api_key:
                        type: string
                        description: >
                            You should set the Google Maps API key in this property.
                    options:
                        type: object
                        description: >
                            You can set any other options in this property.
        
        
        collection_buttons:
            type: object
            description: >
                Collection buttons are intended to be for actions that apply to the form as a whole.
            
            additionalProperties:
                type: object
                properties:
                    ord: *ord
                    copy_of: *copy_of
                    css_class: *css_class
                    label:
                        type: string
                        show_by_default_in_editor: true
                        description: >
                            A label for this button
                    tooltip:
                        type: string
                        description: >
                            A tooltip for this button
                    tooltip_link:
                        type: string
                        description: >
                            If this property is set, the tooltip icon will become a clickable link.
                            You can use relative or absolute links. To use an absolute link, please include <code>http(s)://www</code>.
                    tooltip_link_open_in_new_window:
                        type: boolean
                        description: >
                            If a tooltip link in use, this property will open the link in a new window when set to true.
                    
                    icon_left:
                        type: string
                        description: >
                            This places a <i></> tag to the left of a button with the specified CSS class name(s).
                            Used for adding font-based icons to buttons, e.g. Font Awesome.
                    icon_right:
                        type: string
                        description: >
                            This places a <i></> tag to the right of a button with the specified CSS class name(s).
                            Used for adding font-based icons to buttons, e.g. Font Awesome.
                    
                    hidden: *hidden
                    visible_if: *visible_if
                    
                    hide_with_search_bar:
                        type: boolean
                        description: >
                            If the search bar is hidden, also hide this button.
                    
                    disabled_if: *disabled_if
                    
                    disabled_tooltip:
                        type: string
                        default: (defaults to the tooltip property)
                        description: >
                            A tooltip for this button if it is disabled.
                    
                    no_search_label:
                        type: string
                        description: >
                            The label for the button when no search has been performed yet.
                    
                    location:
                        enum:
                            - back
                            - top
                            - search
                            - above_list
                            - column_header
                            - bottom
                        collection_button_only: true
                        description: >
                            Setting this properly lets you override the default location and put the button in a different position.
                            
                            Note: there is some smart logic; if you choose the "column_header" location but the column headers
                            are not visible due to the "hide_column_headings" option being enabled, the "above_list" option will be
                            automatically used as a replacement.
                            
                            Defaults to "column_header" if not set.
                    
                    confirm: *confirm
                    
                    href:
                        type: string
                        description: >
                            Add this property to set a link on your button.
                    
                    onclick: &onclick
                        type: string
                        description: >
                            Some JavaScript code to run when your button is clicked.
                    
                    new_window: &new_window
                        type: boolean
                        description: >
                            Set this property to make your button open its link in a new window if possible.
                    
                    
                    ajax: &ajax
                        type: object
                        hide_in_editor: true
                        description: >
                            Send an AJAX request to your <code>handlePluginAJAX()</code> method.

                        properties:
                            request: &request
                                type: object
                                additionalProperties:
                                    type: *variable
                                    description: >
                                        A variable to put in the $_POST of the AJAX request.
                                description: >
                                    You can use the request property to add requests to the AJAX request.
                            is_delete:
                                type: boolean
                                description: >
                                    If you flag an item button as a delete button,
                                    the id of the item will be removed from the URL after the AJAX
                                    request has completed.
                            reload_slide:
                                type: boolean
                                description: >
                                    If this is plugin is in a nest, and this property is set,
                                    the current slide will be reloaded after the AJAX request is complete.
                                    
                                    Otherwise just the plugin itself will be reloaded.
                            toast:
                                type: object
                                description: >
                                    Use this to display a "toast" message at the top right
                                    after the AJAX request is complete.
                                    
                                    The toastr library is used;
                                    you can see https://github.com/CodeSeven/toastr for more information.
                                properties:
                                    message:
                                        type: string
                                        description: >
                                            A message for the toast.
                                    title:
                                        type: string
                                        description: >
                                            An optional title for the toast.
                                    
                                    message_type:
                                        enum:
                                            - error
                                            - warning
                                            - info
                                            - success
                                        default: info
                                        description: >
                                            The type of message. A different styling will be applied for each different type.
                                    
                                    options:
                                        additionalProperties:
                                            type: *variable
                                            description: >
                                                Any additional options to pass to the toastr library.
                    
                    
                    export:
                        type: object
                        description: >
                            Use this property to create a file download.
                            When the user clicks the button, a request will be launched to your exportVisitorTUIX()
                            method, which you should use to generate a file download.
                        properties:
                            request:
                                type: object
                                additionalProperties:
                                    type: *variable
                                    description: >
                                        A variable to put in the $_POST of the request.
                                description: >
                                    You can use the request property to add requests to the download request.
                    
                    go:
                        type: object
                        required:
                            - command
                        properties: &go_properties
                            command:
                                type: string
                                description: >
                                    If the nest conductor is running, issue this command.
                            command_animation:
                                type: string
                                description: >
                                    Set this property to issue a command but play the animation
                                    from a different command.
                                    
                                    Commands with specific animations are "back" and "refresh".
                                    
                                    Any other command has a generic animation.
                            mode:
                                type: string
                                description: >
                                    A mode to go to when your button is pressed.
                                    Note: if you specify a command, and the nest conductor is running,
                                    then this will be ignored.
                            locationId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the locationId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            companyId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the companyId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            userId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the userId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            commandId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the commandId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            scheduleId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the scheduleId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            procedureId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the procedureId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            triggerId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the triggerId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            schemaId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the schemaId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            dataPoolId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the dataPoolId variable to this value upon navigation.
                                    Enter an empty string to clear the value.
                            assetId:
                                type: *variable
                                clear_only_in_editor: true
                                description: >
                                    Set the assetId variable to this value upon navigation.
                                    Enter an empty string to clear the value.

                            
                            id_var_name:
                                type: string
                                description: >
                                    You can set this to override the usual idVarName
                                    used by the plugin for this navigation.
                                    
                                    For example, you might have a plugin that usually lists
                                    data pools and uses the "dataPoolId" as the idVarName.
                                    You might sometimes need to show an assert instead, and
                                    need to override the idVarName and set it to "assetId".
                                    
                                    This works from version 8.7 onwards.
                        additionalProperties:
                            type: *variable
                            description: >
                                A variable to add to the request/URL
                        description: >
                            You can use a "go" button to create navigation to another mode.
            
                          
        item_buttons:
            type: object
            description: >
                Item buttons appear next to each item, and are for actions on that item
            additionalProperties:
                type: object
                properties:
                    ord: *ord
                    copy_of: *copy_of
                    css_class: *css_class
                    label:
                        type: string
                        show_by_default_in_editor: true
                        description: >
                            A label for this button
                    tooltip:
                        type: string
                        description: >
                            A tooltip for this button
                    tooltip_link:
                        type: string
                        description: >
                            If this property is set, the tooltip icon will become a clickable link.
                            You can use relative or absolute links. To use an absolute link, please include <code>http(s)://www</code>.
                    tooltip_link_open_in_new_window:
                        type: boolean
                        description: >
                            If a tooltip link in use, this property will open the link in a new window when set to true.
                    
                    icon_left:
                        type: string
                        description: >
                            This places a <i></> tag to the left of a button with the specified CSS class name(s).
                            Used for adding font-based icons to buttons, e.g. Font Awesome.
                    icon_right:
                        type: string
                        description: >
                            This places a <i></> tag to the right of a button with the specified CSS class name(s).
                            Used for adding font-based icons to buttons, e.g. Font Awesome.
                    
                    parent:
                        type: string
                        item_button_only: true
                        description: >
                            Enter the name of another item button here to make your button appear
                            under the named button as a dropdown.
                            
                            There's a limit of 2 levels; you can't have a dropdown inside another dropdown.
                    
                    hidden: *hidden
                    visible_if: *visible_if
                    
                    hide_when_children_are_not_visible:
                        type: boolean
                        item_button_only: true
                        description: >
                            If you set this property, the button will be hidden when it has no
                            visible children.
                    
                    show_as_link_on_column:
                        type:
                            - string
                            - object
                        item_button_only: true
                        description: >
                            You can enter the name of a column to show this button as a link on that column
                            instead of a button.
                            
                            This won't have any effect if the column is hidden, this button has a parent,
                            or this button has children.
                            
                            From Zenario 10.0 onwards you can also provide a lookup array, to list more than one columns
                            to out the same link on.
                    
                    allow_bypass:
                        type: boolean
                        item_button_only: true
                        description: >
                            This can be used when showing a list of items, each with a "view" button.
                            
                            If you do not wish to show the list when only one item is shown, you can set this property to true
                            on the "view" button.
                            
                            When a list only has one item, and this is set, the "view" button will automatically be followed.
                            
                            Note that this only works well when used at the top of the navigation.
                            
                            Also, you should probably set the
                            "Only show the Back button when the previous slide has more than one item to choose from"
                            option on the next slide.
                    
                    confirm:
                        type: object
                        description: >
                            Use this to display a confirmation prompt before performing the button's action.
                        properties:
                            title:
                                type: string
                                description: >
                                    A title for the confirmation prompt.
                            message:
                                type: string
                                description: >
                                    A message for the confirmation prompt.
                
                                    If this is an item or inline button, your message may contain [[merge_field]]s
                                    which match up to the column names, and will be populated according to the item
                                    which is selected.
                            html:
                                type: boolean
                                description: >
                                    If this is set, the message will not be html-escaped.
                            multiple_select_title:
                                type: string
                                description: >
                                    Use this property if you want to set a different title for item buttons when multiple items are selected.
                                    
                                    You can use the [[item_count]] merge field if you want to display the number of items in your message.
                            multiple_select_message:
                                type: string
                                description: >
                                    Use this property if you want to set a different message for item buttons when multiple items are selected.
                                    
                                    You can use the [[item_count]] merge field if you want to display the number of items in your message.
                                    
                                    If you want to list the names of the selected items, you can do so using the format [[name|, | and ]],
                                    where:
                                       - The entries are split by the pipe (|) symbol
                                       - The first entry is the key to look for in the items
                                       - The second entry is a separator, which defaults to a comma and a space if not set
                                       - The third entry is the final separator, which defaults to the second entry if not set
                            button_message:
                                type: string
                                description: >
                                    A message for the confirm button
                            button_css_class:
                                type: string
                                description: >
                                    A css class for the confirm button
                            cancel_button_message:
                                type: string
                                description: >
                                    A message for the cancel button
                    
                    onclick: *onclick
                    new_window: *new_window
                    
                    ajax: *ajax
                    
                    href:
                        type:
                            - string
                            - object
                        properties:
                            replace_with_field_from_item:
                                type: string
                        description: >
                            Add this property to set a link on your button.
                            
                            If you need a different link for each item, you can pass the link in one of the
                            item's properties, then set the code-name of this property in the replace_with_field_from_item
                            property here.
                    
                    go:
                        type: object
                        required:
                            - command
                        properties: *go_properties
                        additionalProperties:
                            type: *variable
                            description: >
                                A variable to add to the request/URL.
                                
                                Alternately you can set the request to an object of the form
                                {replace_with_field_from_item: 'field_code_name'}
                                to automatically put the value of a field into this request.
                        description: >
                            You can use a "go" button to create navigation to another mode.
                            For an item button, the item's id will be automatically added to the requests.
                    
                    
                    
                    multiple_select:
                        type: boolean
                        item_button_only: true
                        description: >
                            This marks that this button is prepared to work on multiple items.
                    multiple_select_max_items:
                        type: number
                        item_button_only: true
                        description: >
                            Do not show this button if more than this number of items are selected.
                    
                            If you use this property you must also use the <code>multiple_select</code> property.
                    multiple_select_min_items:
                        type: number
                        item_button_only: true
                        description: >
                            Do not show this button if less than this number of items are selected.
                    
                            If you use this property you must also use the <code>multiple_select</code> property.
                    multiple_select_only:
                        type: boolean
                        item_button_only: true
                        description: >
                            Same as "multiple_select_min_items: 2"
                    visible_if_for_all_selected_items:
                        type: string
                        item_button_only: true
                        description: >
                            A snippet of JavaScript code to be evaluated for each selected item.
                            Each item must match for the button to be shown.
                            
                            See https://zenar.io/visibility-in-tuix for examples.
                    
                    visible_if_for_any_selected_items:
                        type: string
                        item_button_only: true
                        description: >
                            A snippet of JavaScript code to be evaluated for each selected item.
                            At least one item must match for the button to be shown.
                            
                            See https://zenar.io/visibility-in-tuix for examples.
                    
                    disabled:
                        type: boolean
                        item_button_only: true
                        description: >
                            If you set this property, the button will be disabled.
                    
                    disabled_if: *disabled_if
                    
                    disabled_if_for_all_selected_items:
                        type: string
                        item_button_only: true
                        description: >
                            A snippet of JavaScript code to be evaluated for each selected item.
                            If each item matches, the button will be disabled.
                    
                    disabled_if_for_any_selected_items:
                        type: string
                        item_button_only: true
                        description: >
                            A snippet of JavaScript code to be evaluated for each selected item.
                            If at least one item matches, the button will be disabled.
                            
                            See https://zenar.io/visibility-in-tuix for examples.
                    
                    disabled_tooltip:
                        type: string
                        default: (defaults to the tooltip property)
                        description: >
                            A tooltip for this button if it is disabled.
                            
                            From version 7.1 you can use merge fields in this tooltip when one item is selected.
                    
                    location:
                        enum:
                            - top
                            - bottom
                        collection_button_only: true
                        description: >
                            Setting this properly lets you override the default location and put the button in a different position.
                            
                            This only applies to the "block" view; in the list view the buttons are always on the right and the location
                            property is not used.
                            
                            Defaults to "bottom" if not set.
        
        error_on_form_message:
            type: string
            description: >
                A message to display at the top of the screen when there is an error
                attached to a specific field on the form.
                
                If you don't specify a message, the errors from the fields will be repeated instead.
                    
        confirm_on_close: *confirm
        
        pre_microtemplate:
            type: object
            additionalProperties:
                type: string
            description: >
                The FEA plugins are drawn on the screen using microtemplates.
                You have the ability to customise any of the microtemplates by adding more HTML to the beginning them using this object.
                Enter the name of each microtemplate you wish to customise as property names (e.g. "list", "list_search", and so on),
                and the additional content to add as property values.
                
                You can add snippets of HTML, snippets of microtemplates, or the name of an existing microtemplate that's registered
                in the system.
                
                This works from version 8.6 onwards.
        
        post_microtemplate:
            type: object
            additionalProperties:
                type: string
            description: >
                The FEA plugins are drawn on the screen using microtemplates.
                You have the ability to customise any of the microtemplates by adding more HTML to the end them using this object.
                Enter the name of each microtemplate you wish to customise as property names (e.g. "list", "list_search", and so on),
                and the additional content to add as property values.
                
                You can add snippets of HTML, snippets of microtemplates, or the name of an existing microtemplate that's registered
                in the system.
                
                This works from version 8.6 onwards.
        
        
        
        __page__:
            type: number
            description: >
                If pagination is being applied on the server, the CMS will put the current page number
                into this variable.
                
                This might be different than the page you asked for, e.g. if you ask for page three but
                there are only two pages.
                
        __page_size__:
            type: number
            description: >
                If pagination is being applied on the server, the CMS will put the page size
                into this variable.
                
        __item_count__:
            type: number
            description: >
                The CMS will put the count of the total number of items into this variable.
                
                This includes searches, filters and refiners, but does not include pagination.
                I.e. it's a count of all of the *matched* rows.
                
        __item_sort_order__:
            type:
                - array
                - object
            additionalProperties:
                type: *stringy
            description: >
                If sorting is being done on the server, the CMS will put an array of ids
                (sorted into the correct order) into this variable.
        
        
        
        

        js:
            type:
                - string
                - object
            description: >
                Runs some JavaScript code before the FEA is displayed or redisplayed,
                or before any the navigation logic is followed if you're about to navigate away
                using the go property.
                
                The format is the same as the visible_if property.
        
        close_popout:
            type: boolean
            description: >
                If this FEA plugin was opened in a popout, this sends a signal to close it.

        reload_parent:
            type: boolean
            description: >
                If this FEA plugin was opened in a popout from another FEA, this sends a signal to reload the parent FEA.

        stop_flow:
            type: boolean
            description: >
                This interupts the redrawing for the FEA, or any navigation with the go
                property.
                
                You would probably want to use this at the same time as the close_popout
                property.
        
        go:
            type: object
            required:
                - command
            properties: *go_properties
            additionalProperties:
                type: *variable
                description: >
                    A variable to add to the request/URL.
                    
                    Alternately you can set the request to an object of the form
                    {replace_with_field_from_item: 'field_code_name'}
                    to automatically put the value of a field into this request.
            description: >
                This property allows you to trigger navigation in TUIX forms.
                It is ignored when the form is first displayed, but will be followed when
                the form is re-displayed (e.g. because the user pressed the save button).
        
        go_to_url:
            type: string
            description: >
                This property allows you to trigger navigation in TUIX forms.
                It is ignored when the form is first displayed, but will be followed when
                the form is re-displayed (e.g. because the user pressed the save button).
        
        js_after:
            type:
                - string
                - object
            description: >
                Runs some JavaScript code after the FEA is displayed or redisplayed,
                or after the navigation logic is finished if you just navigated away
                using the go property.
                
                The format is the same as the visible_if property.
        
        missing_items_warning:
            type: string
            description: >
                The form toolkit will not display selected values for checkboxes, radios or select lists
                that are not in the provided LOV.
                
                It will also not save these values.
                
                If you want to enable a warning when this is about to happen, you can enable it by adding
                some text to this property, e.g. "Warning: ID [[items]] missing, save settings to clean up."
                
                This works from version 8.8 onwards.
        
        always_sync_this_data_between_client_and_server:
            type: object
            description: >
                This object, and any child objects and properties, will always be synced between the client
                and the server.
                
                To help make TUIX forms and applications secure, and to make it harder for a developer to
                unwittingly introduce security vulnerabilities in their code, only a few TUIX properties
                that have a specific purpose can be synced between the client and the server.
                
                This object is provided as a free-for-all exception, so anyone making a custom application
                can add anything they need synced in here.
                
                This works from version 9.4 onwards.
        
        never_sync_this_data_between_client_and_server:
            type: object
            description: >
                This object, and any child objects and properties, will never be synced between the client
                and the server.
                
                This object allows you to send slightly larger data streams from the server to the client,
                on a one-time-only basis.
                
                Anything in here won't be saved in the cache/fabs/ directory, and won't be sent back from
                the client to the server.
                
                This is an exception to how TUIX forms, FEA forms and FEA dashes usually work, where a copy of the TUIX
                sent to the client is kept on the server, and the two are kept in sync.
                
                Any data that is large, or does not need to be kept in sync between the client and the server,
                should be put in here.
                
                This works from version 9.4 onwards.
        
        handle_signals:
            type: object
            description: >
                A list of JavaScript signals that a "dash" or a "graph"-type FEA can listen to.
                
                To handle a signal, you should:
                    1. Add its name to this list.
                    2. (Optionally) create a method called signalNameOnRegister() in your dash/graph's library, to be called when the signal is registered.
                    2. Create a method called signalName() in your dash/graph's library, to be called when the signal is sent.
        
        send_signals_on_events:
            type: object
            description: >
                Warning! This feature is deprecated and may be removed soon! Please use the send_signal_onchange and
                send_signal_after_redraw properties instead!
                
                These are pre-defined JavaScript events in your FEA plugin that you can trigger signal to be sent on.
                For each event, you can set the code-name for a signal to be sent when the event happens.
            properties:
                formRedraw:
                    type: string
                    description: >
                        If you enter a code-name in this property, a signal with the name you provide in will be sent
                        when a FEA form is redrawn,
                        e.g. due to the redraw_onchange property being placed on a field.
                formFormat:
                    type: string
                    description: >
                        If you enter a code-name in this property, a signal with the name you provide in will be sent
                        when a FEA form is formatted via AJAX and then redrawn,
                        e.g. due to the format_onchange property being placed on a field.
                formValidate:
                    type: string
                    description: >
                        If you enter a code-name in this property, a signal with the name you provide in will be sent
                        when a FEA form is validated via AJAX and then redrawn,
                        e.g. due to the validate_onchange property being placed on a field.
                formSave:
                    type: string
                    description: >
                        If you enter a code-name in this property, a signal with the name you provide in will be sent
                        sent when a FEA form is saved via AJAX and then redrawn,
                        e.g. due to a button with the save_onchange property.
                        
                        Note: This signal will only fire if a form is "saved in place" and not actually closed.
                        If saving the form causes some kind of conductor navigation, this signal won't fire.
