Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

MultiSelect with checkboxes

I have a SharePoint choice field that allows multiple selections so it's displayed as checkboxes. I figured it was a KendoMultiSelect in the rendered HTML but I have done nothing with Kendo to know exactly how to address the checkboxes and set/unset them. I need the buttons on the right to select the appropriate days, or all days, meals. Can you help me with some javascript?

Uploaded files:
  • mealsSelect.PNG

I was able to do it with standard HTML jquery selectors.  Thanks.

i.e.:

$("#BtnSelectDay7").on("click", function(e){
e.preventDefault();
var items = $("input[value^='Day 7 ']");
var itemIds = ["Breakfast","Lunch","Dinner"];
for(var i=0;i < items.length;i++){

if($("input[value='Day 7 "+itemIds[i] + "'").is(":checked")) {
$("input[value='Day 7 "+itemIds[i] + "'").prop("checked", false);
} else {
$("input[value='Day 7 "+itemIds[i] + "'").prop("checked", true);
}
}
});

James Restivo has reacted to this post.
James Restivo

Excellent! Thank you for the update and for sharing your solution!