## The Basics

<select>

### Value

    {{ basicsValue }}

## Multi-Value

<select multiple>

### Value

    {{ multiValue }}

Pre-defined value

### Config

    {
        multiple: true,
        query: function (query) {
          query.callback({ results: states });
        },
        initSelection: function(element, callback) {
          var val = $(element).select2('val'),
            results = [];
          for (var i=0; i<val.length; i++) {
            results.push(findState(val[i]));
          }
          callback(results);
        }
      }

### Value

    {{ multi2Value }}

## Placeholders

Using data-attribute

### Value

    {{ placeholdersValue }}

Multiple, using config

### Config

    {{ placeholders }}

### Value

    {{ placeholdersMultiValue }}

## Array Data

Simple

### Config

    {{ array }}

### Value

    {{ arrayValue }}

Asynchronous

### Config

    {
        query: function (query) {
          query.callback({ results: states });
        },
        initSelection: function(element, callback) {
          var val = $(element).select2('val');
          return callback(findState(val));
        }
      }

### Value

    {{ arrayAsyncValue }}