MDL-64151 forms: select element without selection
Select element that is not multiple should export null when nothing is selected. If the element is displayed there will always be something selected.
This commit is contained in:
+1
-1
@@ -166,7 +166,7 @@ class MoodleQuickForm_select extends HTML_QuickForm_select implements templatabl
|
||||
*/
|
||||
function exportValue(&$submitValues, $assoc = false)
|
||||
{
|
||||
$emptyvalue = $this->getMultiple() ? [] : '';
|
||||
$emptyvalue = $this->getMultiple() ? [] : null;
|
||||
if (empty($this->_options)) {
|
||||
return $this->_prepareValue($emptyvalue, $assoc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user