# SelectField

## SelectField (select)

This field allows you to display a list.![Kapture.gif](https://docs.intalioservices.com/uploads/images/gallery/2020-05/tfxkH8OpiQi0YssE-Kapture.gif)

<div data-lang="JSON" id="bkmrk-%7B-%22size%22%3A-%22s12-m12%22%2C"><div>```JSON
{<br></br>  "size": "s12 m12",<br></br>  "type": "select",<br></br>  "id": "api_Finder",<br></br>  "label": "API Finder",<br></br>  "validate": [<br></br>    "required"<br></br>  ],<br></br>  "icon": "find_in_page",<br></br>  "allow_add": false,<br></br>  "search": true,<br></br>  "search_error": "Brak pracowników pasujących do podanych kryteriów...",<br></br>  "placeholder": "api finder placeholder",<br></br>  "alphabetical_sorting": true,<br></br>  "define_output_value": "label",<br></br>  "add_session_id_to_api": true,<br></br>  "api_dynamic": {<br></br>    "delay": 250,<br></br>    "api": "https://kprm.int.intalio.pl/otrs/get-all-users.pl",<br></br>    "searching_label": "Trwa wyszukiwanie pracowników..."<br></br>  },<br></br>  "options": [<br></br>    {<br></br>      "value": "",<br></br>      "label": "",<br></br>      "selected": "true",<br></br>      "disabled": "disabled"<br></br>    }<br></br>  ]<br></br>},
```

<div><span style="color: #222222; font-size: 2.333em; font-weight: 400;">allow\_add</span></div></div></div>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](https://docs.intalioservices.com/uploads/images/gallery/2020-05/XvZTFTDMLWuqfKrA-image-1590491763376.gif)](https://docs.intalioservices.com/uploads/images/gallery/2020-05/XvZTFTDMLWuqfKrA-image-1590491763376.gif)

### search

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.

<p class="callout warning">Remember, if you don't want the first option to be checked by default, you must add an empty first option!</p>

#### value

Field value.

#### label

Field label.

#### checked

Should the field be selected by default.

#### disabled

Is the field to be inactive by default.

### api\_dynamic

<p class="callout info">Added in version **1.0.24**</p>

[![image-1620142849407.gif](https://docs.intalioservices.com/uploads/images/gallery/2021-05/QmJzNt9CkxxKJIok-image-1620142849407.gif)](https://docs.intalioservices.com/uploads/images/gallery/2021-05/QmJzNt9CkxxKJIok-image-1620142849407.gif)

This field allows you to search the api dynamically.

<p class="callout info">This field supports all other api attributes (e.g. add\_session\_id\_to\_api)</p>

**Response:**

<div data-lang="callout info" id="bkmrk-required-format-data"><textarea style="display: none;">Required format data: { "options": \[ { "value": "p.majewski", "label": "Piotr Majewski (p.majewski)" }, { "value": "piotr", "label": "Piotr Nowak (piotr)", } \] } </textarea><div><div>```JSON
{<br></br>  "options": [<br></br>    {<br></br>      "value": "p.majewski",<br></br>      "label": "Piotr Majewski (p.majewski)"<br></br>    },<br></br>    {<br></br>      "value": "piotr",<br></br>      "label": "Piotr Nowak (piotr)",<br></br>    }<br></br>  ]<br></br>}<br></br>
```

</div></div></div>#### delay

<span class="hljs-comment">The number of milliseconds to wait for the user to stop typing before</span><span class="hljs-comment"> issuing the ajax request.</span>

#### api

The url that the request should be made to.

#### searching\_label

Translation for the search text.

### The rest of the available parameters:

<p class="callout info">This field supports all parameters with ["Attributes available for each field".](https://docs.intalioservices.com/books/dynamic-forms---installation-and-administrators-guide/page/attributes-available-for-each-field "Attributes available for each field")</p>