I would say, only if both checkboxes are checked and the user is well informed → they can pass —> right?
$w.onReady(() => {
// Initially disable the buttons
$w('#button31, #button32').disable();
// Event listener for checkbox1
$w('#checkbox1').onChange(() => {check_Checkboxes();});
// Event listener for checkbox2
$w('#checkbox2').onChange(() => {check_Checkboxes();});
// Function to check both checkboxes and enable/disable buttons accordingly
function check_Checkboxes() {
if ($w('#checkbox1').checked && $w('#checkbox2').checked) {
$w('#button31, #button32').enable();
}
else {$w('#button31, #button32').disable();}
}
});
In SUMMARY, without COMMENTS… → plain, clear CODE
$w.onReady(()=> {
$w('#button31, #button32').disable();
$w('#checkbox1, #checkbox2').onChange(()=> {check_Checkboxes();});
//------------------------
function check_Checkboxes() {
if ($w('#checkbox1').checked && $w('#checkbox2').checked) {
$w('#button31, #button32').enable();
} else {$w('#button31, #button32').disable();}
}
});