title: Select2 textbox set initial value
body: <p>I have a Select2 input which is a textbox and I make it this way</p>
  
  <pre><code>&lt;input type="text" class="selectbox" name="selectbox['.$row[0].']" /&gt;
  </code></pre>
  
  <p>I am supposed to set the initial value dynamically from mysql like this <code>value="'.$row[1].'"</code> but it doesn't work.</p>
  
  <p>Here's my Jquery that sets the select2:</p>
  
  <pre><code> $(".selectbox").select2({
           placeholder: "Search for a Golf Course",
           minimumInputLength: 1,
            ajax: {
                  url: "functions/searchGolfCourses.php",
                  quietMillis:100,
                  dataType: 'json',
                  params: {
                  method: 'post'
                  },
                  data: function (term, page) {
                  // Data to be sent to the server. Usually it is just the "term"
                  // parameter (and page if using pagination).
                  // However, since this API simply echoes back what we send,
                  return { s: term /* 's' is passed to php as $_POST['s'], this will contains the user input*/
                  }
            },
      results: function(data, page) {
          //data param === received response from the server. As dataType
          //is json, jQuery automatically parses the response into an object.
          return { results: data };
      }
    }
  });
  </code></pre>
  
  <p>Any idea how to set the intial value of a Select2 input box? thanks in advance</p>