# 29. Multiselect

**Multiselect** enables to selection of different options from the list to the corresponding setting:

<figure><img src="/files/kNudj2eZU8Bmv9vgDqg5" alt=""><figcaption></figcaption></figure>

There  is also an availability to add **new elements** **to the list** right from the **Multiselect**:

<div><figure><img src="/files/P5mEHmULqy5REH5CFkpa" alt=""><figcaption></figcaption></figure> <figure><img src="/files/KwPOuXRyIwLRRfvjZr5w" alt=""><figcaption></figcaption></figure></div>

```php
'tab_title_selected_labels' => array(
   'type'    => 'multiselect',
   'label'   => esc_html__( 'Add features to the list', 'stm_vehicles_listing' ),
   'options' => $this->motors_get_features_list(),
   'new_tag_settings' => array(
      'add_label'     => esc_html__( 'Add New Feature', 'stm_vehicles_listing' ),
      'taxonomy_name' => 'stm_additional_features',
      'placeholder'   => 'Enter feature name',
      'add_btn'       => 'Add',
      'cancel_btn'    => 'Cancel',
   ),
),

#new_tag_settings - to insert the 'Add New' button
```

If you have some elements in one list of options, you have to add a unique selector and specify it in config under the key `track_by`

```php
'multiselect_2' => array(
    'type' => 'multiselect',
    'label' => esc_html__( 'Multiselect', 'my-domain' ),
    'options' => array(
        array(
            'label' => 'My super title 1',
            'value' => '1'
        ),
        array(
            'label' => 'My super title 1',
            'value' => '2'
        ),
    ),
    'track_by' => 'value'
),
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stylemixthemes.com/nuxy/fields/29.-multiselect.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
