Forum Discussion
MichaelBauer
7 years agoCommunity Member
Forcing "completion" of a checkbox list
Hi all
Is there a way that we can force the learner to click the boxes on the Checkbox List? Of course a text instruction would be placed with this, however it would be great just to mix things up...
JohnSarris-78d7
6 years agoCommunity Member
We ran into the same issue with learners being able to uncheck boxes. I ended up adding some Javascript to the exported course to hide the "hit area" of a checkbox after it's clicked. It's crude, but it worked for us.
var el = document.getElementsByClassName("block-list__checkbox__hitarea");
window.onload = function (){
var i = setInterval(function (){
if (el.length){
clearInterval(i);
el[0].addEventListener("click", function(){el[0].hidden = true}, false);
el[1].addEventListener("click", function(){el[1].hidden = true}, false);
el[2].addEventListener("click", function(){el[2].hidden = true}, false);
}}, 100);};