# Form Select > Bootstrap custom ``.

Be cautious of placing user supplied content in the html field, as it may make you vulnerable to XSS attacks, if you do not first sanitize the user supplied string.

### Options as an array ```js const options = ['A', 'B', 'C', { text: 'D', value: { d: 1 }, disabled: true }, 'E', 'F'] ``` If an array entry is a string, it will be used for both the generated `value` and `text` fields. You can mix using strings and [objects](#options-as-an-array-of-objects) in the array. Internally, BootstrapVue will convert the above array to the following array (the [array of objects](#options-as-an-array-of-objects)) format: ```js const options = [ { text: 'A', value: 'A', disabled: false }, { text: 'B', value: 'B', disabled: false }, { text: 'C', value: 'C', disabled: false }, { text: 'D', value: { d: 1 }, disabled: true }, { text: 'E', value: 'E', disabled: false }, { text: 'F', value: 'F', disabled: false } ] ``` ### Options as an array of objects ```js const options = [ { text: 'Item 1', value: 'first' }, { text: 'Item 2', value: 'second' }, { html: 'Item 3', value: 'third', disabled: true }, { text: 'Item 4' }, { text: 'Item 5', value: { foo: 'bar', baz: true } } ] ``` If `value` is missing, then `text` will be used as both the `value` and `text` fields. If you use the `html` property, you **must** supply a `value` property. New in v2.2.0 To define option groups, just add an object with a `label` prop as the groups name and a `options` property with the array of options of the group. ```js const options = [ { text: 'Item 1', value: 'first' }, { text: 'Item 2', value: 'second' }, { label: 'Grouped options', options: [{ html: 'Item 3', value: 'third', disabled: true }, { text: 'Item 4' }] }, { text: 'Item 5', value: { foo: 'bar', baz: true } } ] ``` ### Options as an object Deprecated Keys are mapped to `value` and values are mapped to option `text`. ```js const options = { a: 'Item A', b: 'Item B', c: { html: 'Item C', disabled: true }, d: { text: 'Item D', value: 'overridden_value' }, e: { text: 'Item E', value: { foo: 'bar', baz: true } } } ``` Internally, BootstrapVue will convert the above object to the following array (the [array of objects](#options-as-an-array-of-objects)) format: ```js const options = [ { text: 'Item A', value: 'a', disabled: false }, { text: 'Item B', value: 'b', disabled: false }, { html: 'Item C', value: 'c', disabled: false }, { text: 'Item D', value: 'overridden_value', disabled: true }, { text: 'Item E', value: { foo: 'bar', baz: true }, disabled: false } ] ``` **Note:** When using the Object format, the order of the final array is **not** guaranteed. For this reason, it is recommended to use either of the previously mentioned array formats. ### Changing the option field names If you want to customize the field property names (for example using `name` field for display `text`) you can easily change them by setting the `text-field`, `html-field`, `value-field`, and `disabled-field` props to a string that contains the property name you would like to use: ```html ``` ### Option notes If the initial value of your `v-model` expression does not match any of the options, the `` component (which is a native HTML5 `` rendered (although the class `.form-control` will always be placed on the select). A `plain` select will always be rendered for non `multiple` selects which have the `select-size` prop set to a value greater than 1.