<?php

return [
    "type"           => "forms",
    "model"          => App\Models\Form::class,
    "label"          => "Forms",
    "label_singular" => "Form",
    "group"          => "Form Builder",
    "order"          => TRUE,

    "search" => [],

    "fields" => [
        [
            "name"          => "title",
            "label"         => "Form Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "description",
            "label"         => "Description",
            "type"          => "textArea",
            "multiLanguage" => TRUE,
            "preValidation" => "xss_clean|trim",
            "validation"    => "nullable",
            "inList"        => FALSE,
            "search"        => TRUE,
            "sort"          => FALSE
        ],
        [
            "name"          => "event_date",
            "label"         => "Event Date",
            "type"          => "datePicker",
            "inputType"     => "date",
            "multiLanguage" => FALSE,
            "validation"    => "nullable",
            "placement"     => "sidebar",
            "info"          => "Date of the event. Used in the confirmation email only."
        ],
        [
            "name"          => "event_time",
            "label"         => "Event Time",
            "type"          => "datePicker",
            "inputType"     => "time",
            "multiLanguage" => FALSE,
            "validation"    => "nullable",
            "placement"     => "sidebar",
            "info"          => "Time of the event (Berlin/Brussels timezone). Used in the confirmation email only."
        ],
        [
            "name"          => "contact_email",
            "label"         => "Contact Email",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "trim",
            "validation"    => "nullable|email|max:150",
            "placement"     => "sidebar",
            "info"          => "Contact address shown to participants (confirmation email and duplicate-submission notice). Leave empty to use the site default."
        ],
        [
            "name"        => "formSections",
            "label"       => "Form Sections",
            "type"        => "singlePicker",
            "objectType"  => "formSections",
            "order"       => TRUE,
        ],
    ],

    "actions" => [
        "edit", "insert", "delete"
    ]
];
