2

I am trying to select multiple values inside a drop down using check boxes, I confused how to attain without changing TLD file. ie each option for the select will have the check box

sample html

sample code which iI work is below

 <form:select path="brandIds" id="brandDropdownSelectId" tabindex="31" multiple="true" size="4"  >
                            <option value="0">Select Brand</option>
                            <form:options items="${brandList}" itemValue="brandId"
                                itemLabel="brandName" checkbox="true"/>
                        </form:select>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Brittas
  • 491
  • 1
  • 5
  • 18

2 Answers2

0

You can use external component like Twitter Bootstrap Multi-select

Jigar Naik
  • 1,946
  • 5
  • 29
  • 60
0

You can never use Checkbox inside a Select tag. But, to solve this issue, we make use of CSS+Javascript to render the effect.

You define a empty select tag with a javascript function to alter the visibility of the checkboxes on click, and CSS plays the role of portraying the rendering in single effect.

This might help you: Adding checkboxes inside a Select Tag

Community
  • 1
  • 1
Abhishek Jain
  • 630
  • 6
  • 26