/** * Returns a 'safe' element's value * * @param array array of submitted values to search * @param bool whether to return the value as associative array * @access public * @return mixed */ function exportValue(&$submitValues, $assoc = false) { if ($this->ajax || $this->tags) { // When this was an ajax request, we do not know the allowed list of values. $value = $this->_findValue($submitValues); if (null === $value) { $value = $this->getValue(); } // Quickforms inserts a duplicate element in the form with // this value so that a value is always submitted for this form element. // Normally this is cleaned as a side effect of it not being a valid option, // but in this case we need to detect and skip it manually. if ($value === '_qf__force_multiselect_submission' || $value === null) { $value = ''; } return $this->_prepareValue($value, $assoc); } else { return parent::exportValue($submitValues, $assoc); } }