-
Bug
-
Resolution: Fixed
-
Minor
-
4.2.8, 4.3, 4.4
-
1
-
Team Hedgehog 2024 Sprint 2.1, Team Hedgehog 2024 Sprint 2.2
-
Small
In the attached php file (with a mform class definition method), I added a "radio" and a "filemanager" mform element.
"Filemenager" SHOULD get disabled on the basis of the selection of the radio button.
If the first "radio" is selected, the filemanager is active. Otherwise, it is not.
In spite of this, it seems the disabilitation does not ALWAYS work. Infact, for instance, it does not work if the filemanager element is added to the mform using $mform->addGroup.
You can try it by yourself coping the attached file to your local moodle root and navigating it.
It seems the line:
$mform->disabledIf($filemanagerbasename, $booleanbasename, 'neq', '1');
in line 61 has no effect.
On the opposite side: by setting
$usefilemanagergroup = false
in line 47, the same "filemanager" element is added to the form using the simpler $mform->addElement and the disabilitation works fine.
- has been marked as being related by
-
MDL-66251 Static form elements cannot be hidden using hideIf and disabled using disabledif
-
- Closed
-
-
MDL-68540 hideIf function doesn't work with editor field
-
- Closed
-
- has to be done before
-
MDL-82096 Filemanager mform element added using addGroup is not seen from behat
-
- Open
-