<?php

return [
    "type"           => "fieldOptions",
    "model"          => App\Models\FieldOption::class,
    "label"          => "Form Field Options",
    "label_singular" => "Form Field Option",
    "group"          => "none",
    "parent" => array(
        "field" => "form_field_id",
        "contentType" => "form_fields"
    ),
    "order"          => TRUE,

    "search" => [],

    "fields" => [
        [
            "name"          => "title",
            "label"         => "Title",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "label",
            "label"         => "Option Label",
            "type"          => "textBox",
            "maxLength"     => 250,
            "multiLanguage" => TRUE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:250",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "value",
            "label"         => "Option Value",
            "type"          => "textBox",
            "maxLength"     => 100,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "required|max:100",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE
        ],
        [
            "name"          => "conditional_field_parent_id",
            "label"         => "Conditional Field Parent ID",
            "type"          => "textBox",
            "maxLength"     => 150,
            "multiLanguage" => FALSE,
            "preValidation" => "strip_tags|xss_clean|trim",
            "validation"    => "max:150",
            "inList"        => TRUE,
            "search"        => TRUE,
            "sort"          => TRUE,
            "info"          => "The ID of the parent field for conditional logic (not spaces, lowercase ex: id_unique_name)"
        ],
    ],

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