-
Improvement
-
Resolution: Unresolved
-
Minor
-
2.1.1, 3.6.5, 3.7.1, 3.8
-
MOODLE_21_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
MDL-29421-master
-
HTML_QuickForm_element has a nice feature called freezing. One can call $element->freeze() and element will be displayed as a static label+value pair plus a hidden field with a value.
There is also an attribute _persistantFreeze (see method setPersistantFreeze), true by default. If set to false, no hidden field is generated.
This feature is forgotten in the elements of type 'editor' and 'filepicker' (lib/form/editor.php and lib/form/filepicker.php)
method toHtml() in both classes call getFrozenHtml() if element is frozen, but the classes do not redeclare the function getFrozenHtml()
in case of filepicker, the draftitemid is displayed (could be list of files)
in case of editor, warning is thrown because parent function assumes value to be a scalar. Also editor needs to redeclare hidden field generation in _getPersistantData() (or not use this function)
the select field (lib/pear/HTML/QuickForm/select.php) can be used as an example of an element with an array stored in _value.
- has been marked as being related by
-
MDL-79026 Areas created via IMS Enterprise return NULL instead of 'Blank' in Moodle 4
- Waiting for peer review
-
MDL-29701 mform disableif doesn't work on 'editor' element when wysiwig enabled
- Closed
-
MDL-56105 mform->disabledIf not working properly for filepicker
- Closed
-
MDL-30974 forms API, phpdocs and devdocs
- Closed
-
MDL-57195 Check Boost theme handling of the soft and hard frozen form elements
- Closed
- is duplicated by
-
MDL-45815 Filemanager mform elements are completely discarded in readonly forms
- Open
-
MDL-58739 Custom profile fields - text area content not shown when disabled.
- Closed
-
MDL-25067 mform editor element can not be disabled with mform->disabledIf method
- Closed
-
MDL-78112 Form elements filepicker does not support freezing
- Closed
- will be (partly) resolved by
-
MDL-45815 Filemanager mform elements are completely discarded in readonly forms
- Open
-
MDL-58519 MoodleQuickForm_editor::getValue() is not compatible with MoodleQuickForm::exportValues() logic
- Closed