-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.3.1
-
MOODLE_23_STABLE
Using the attached moodle form I tried to disable the second mform element (the select) IF AND ONLY IF the selection in the checkbox element is:
Spain: checked
France: not checked
Germany: not checked
Italy: checked
I tried few ways to call the disabledif method but never with success.
Using:
$mform->disabledIf('secondformelement', 'firstformelement_1', 'notchecked');
|
$mform->disabledIf('secondformelement', 'firstformelement_2', 'eq', 1);
|
$mform->disabledIf('secondformelement', 'firstformelement_3', 'eq', 1);
|
$mform->disabledIf('secondformelement', 'firstformelement_4', 'notchecked');
|
and looking at the html code I only found:
Y.on('domready', function() {
|
Y.use('mform', function(Y) {
|
M.form.initFormDependencies(Y, "mform1", {
|
"firstformelement_1":{
|
"notchecked":{
|
"1":["secondformelement"]
|
}
|
},
|
"firstformelement_2":{
|
"eq":{
|
"1":["secondformelement"]
|
}
|
}
|
});
|
});
|
});
|
without any reference to firstformelement_3 and firstformelement_4.