bootstrap-select getting value at backend

2.6k views Asked by At

I have a simple selector

<select class="selectpicker">
 <option>Mustard</option>
  <option>Ketchup</option>
   <option>Barbecue</option>
</select>

This is inside a form and I am using bootstrap-select for selecting multiple values for this drop down.

Any idea how to multiple values at back-end ?

I am able to get value if only one option is selected

If you choose multiple and try to get the object by id in my backend code (Java) only one option is coming instead of multiple options

1

There are 1 answers

2
Praveen Kumar Purushothaman On BEST ANSWER

Read the manual!!!

<select class="selectpicker" multiple>
    <option>Mustard</option>
    <option>Ketchup</option>
    <option>Relish</option>
</select>

Use the attribute multiple with the <select> tag!