title: How to post multiselect selected options as one param in url - Bootstrap Multiselect
body: <p>I am using <a href="http://davidstutz.github.io/bootstrap-multiselect" rel="nofollow">bootstrap-multiselect</a> and need to submit form with selected options.</p>
  
  <p>However on form submit, url gets like this <code>....&amp;sites=1&amp;sites=2&amp;sites=3</code> while I need it to be <code>...&amp;sites=1,2,3</code> </p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;select id="sites" name="sites" class="form-control" multiple="multiple"&gt;
      &lt;option value="1"&gt;Site 1&lt;/option&gt;
      &lt;option value="2"&gt;Site 2&lt;/option&gt;
      &lt;option value="3"&gt;Site 3&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$('button[type=submit]').click(function () {
  
        var text = $('#sites').val()
        //I have the list in `text` as 1,2,3 which need to in url
        //do the rest and continue submit
  </code></pre>
  
  <p>How can I POST these selected values in url (i.e <code>url/sites=1,2,3</code> instead of <code>url/sites=1&amp;sites=2&amp;sites=3</code>) </p>
  
  <p>Thanks for any help!</p>