Skip to main content

SelectField

SelectField (select)

This field allows you to display a list.Kapture.gif

{
  "size": "s12 m12",
  "type": "select",
  "id": "1_7_IssueType",
  "label": "I have a problem with",
  "validate": [
    "required"
  ],
  "icon": "find_in_page",
  "allow_add": false,
  "search": false,
  "search_error": "No data",
  "placeholder": "Choose what you have a problem with",
  "alphabetical_sorting": true,
  "define_output_value": "label",
  "options": [
    {
      "value": "",
      "label": "",
      "selected": "true",
      "disabled": "disabled"
    },
    {
      "label": "Computer",
      "value": "Computer"
    },
    {
      "label": "Smartphone",
      "value": "Smartphone"
    },
    {
      "label": "Car",
      "value": "Car"
    },
    {
      "label": "Other",
      "value": "Other"
    }
  ]
}

allow_add

Enabling this parameter will add new things to the list. If your list is not closed, you can let new things be added to it.

image-1590491763376.gif

It allows you to search in the list, if it is enabled together with "allow_add" you will be able to search, or if you do not find an interesting option - add your own.

search_error

 If the item you are looking for is not found, the message given here will be displayed.

alphabetical_sorting

 Enable alphabetical sorting of fields. If this option is disabled, the fields are displayed in the order given in the "options" parameter.

define_output_value

 Each field is described by two parameters "label" and "value". If you want to, you can define here whether you want the system to be "label" or "value".

options

 All available selection options.

value

 Field value.

label

 Field label.

checked

 Should the field be selected by default.

disabled

Is the field to be inactive by default.