سؤال

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

هل كانت مفيدة؟

المحلول

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!

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top