> For the complete documentation index, see [llms.txt](https://wpsf.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wpsf.gitbook.io/docs/faq/how-to-use-attributes.md).

# How to Use Attributes

## How to Use Attributes <a href="#how-to-use-attributes" id="how-to-use-attributes"></a>

You can use some attibutes for fields. Let’s see some examples for how to use attributes.

### [read more about tag\_input attributes](http://www.w3schools.com/tags/tag_input.asp)

```php
array(
  'id'            => 'unique_option_101',
  'type'          => 'text',
  'title'         => 'Text Field',
  'attributes'    => array(
    'maxlength'   => 10,
    'placeholder' => 'do stuff',
    'readyonly'   => 'only-key'
    'disabled'    => 'only-key'
  ),
),
```

### [read more about tag\_textarea attributes](http://www.w3schools.com/tags/tag_textarea.asp)

```php
array(
  'id'            => 'unique_option_102',
  'type'          => 'textarea',
  'title'         => 'Text Field',
  'attributes'    => array(
    'rows'        => 10,
    'cols'        => 5,
    'placeholder' => 'do stuff',
  ),
),
```

### [read more about tag\_select attributes](http://www.w3schools.com/tags/tag_select.asp)

```php
array(
  'id'         => 'unique_option_103',
  'type'       => 'select',
  'title'      => 'Select Field',
  'options'    => array(
    'green'    => 'Green',
    'blue'     => 'Blue',
    'yellow'   => 'Yellow',
  ),
  'attributes' => array(
    'multiple' => 'multiple',
    'style'    => 'width: 125px; height: 125px;',
  ),
),
```
