Share via


SharePoint 2010: Select All Checkboxes Using JQuery in SharePoint Choice Field

This article is very useful for creating Select All Checkboxes using jquery in SharePoint Choice field.
You need to add Content Editor WebPart or HTML Form WebPart on your NewForm and/or EditForm and paste below script.

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js%22%20originalAttribute=%22href%22%20originalPath=%22> 
 
<script type="text/javascript"> 
 
 $(document).ready(function(){ 
 
       $(".ms-RadioText[title='Select All'] :checkbox").click( 
 
       function(){  
                var checked_status = this.checked;
 
                 var otherids = (this.id).substring(0, (this.id).length-2 ); 
 
                  $("input[id^='"+otherids+"']").each(function()
{
     this.checked = checked_status;
 
});
 
       }); 
 
   }); 
 
</script>