Click here to Skip to main content
15,351,370 members
Articles / Web Development / HTML
Posted 11 Jul 2019


7 bookmarked

Multi-select Check Box List or Checkbox Dropdown with Select All Option

Rate me:
Please Sign up or sign in to vote.
3.74/5 (6 votes)
11 Jul 2019CPOL
How to create a checkbox list using simple HTML and jQuery


Check Box list is useful to allow the user to select multiple options in a select box. But in this case, multiple options can be selected by holding down the control (ctrl) button and the user hates that. Instead of using the multiple attributes in HTML, you can use jQuery to make the multi-select checkbox dropdown.

This is a simple HTML Control with jQuery & CSS that you can use in any web programming language.

Live Demo

Using the Code

I wrote an extension method using jQuery, you can define your dropdown select control and call CreateMultiCheckBox method.

This method will simply convert your select control into multi-select checkbox list control.

<select id="test">
  <option value="1">American Black Bear</option>
  <option value="2">Asiatic Black Bear</option>
  <option value="3">Brown Bear</option>
  <option value="4">Giant Panda</option>
  <option value="5">Sloth Bear</option>
  <option value="6">Sun Bear</option>
  <option value="7">Polar Bear</option>
  <option value="8">Spectacled Bear</option>

Convert Select Into Multi Select Checkbox

Here "test" is your control id, you can also pass default options, such as width, height & default title of control.

$(document).ready(function () {
  $("#test").CreateMultiCheckBox({ width: '230px',
             defaultText : 'Select Below', height:'250px' });


I put CSS and jquery on the same page, you can separate according to your project. Here is the full download .


  • 11th July, 2019: Initial version


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Thiagarajan Rajendran
United States United States
No Biography provided

Comments and Discussions

QuestionUsing optgroups in multicheckbox Pin
Member 151853695-May-21 9:53
MemberMember 151853695-May-21 9:53 
Question$_POST wrong Pin
lapix8-Oct-20 3:32
Memberlapix8-Oct-20 3:32 
QuestionGreat solution. Pin
Member 1046221617-Sep-20 5:46
MemberMember 1046221617-Sep-20 5:46 
AnswerRe: Great solution. Pin
Member 1046221617-Sep-20 21:12
MemberMember 1046221617-Sep-20 21:12 
QuestionInprovment Pin
Klaus Kurzawa12-Jul-19 18:55
MemberKlaus Kurzawa12-Jul-19 18:55 
QuestionDownload code link not working Pin
Tom-Sacramento12-Jul-19 9:17
MemberTom-Sacramento12-Jul-19 9:17 
QuestionDownload link no work Pin
Edward Ocando12-Jul-19 6:03
MemberEdward Ocando12-Jul-19 6:03 
GeneralMy vote of 5 Pin
jgakenhe12-Jul-19 3:24
professionaljgakenhe12-Jul-19 3:24 
That's actually quite nice! You should include all of your code in the Tip Trick and explain it. I was looking through it by way of your demo link.
PraiseMulti-select check box Pin
Member 1416447312-Jul-19 1:22
MemberMember 1416447312-Jul-19 1:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.