Pregunta

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

¿Fue útil?

Solución

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!

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top