HTML_QuickForm::exportValues() – Returns "safe" elements' values


require_once 'HTML/QuickForm.php';

array HTML_QuickForm::exportValues ( mixed $elementList = null )


Returns the values for the form elements. First it tries to return filtered submitted values, if there were none then it takes the values set by setDefaults() or setConstants().

Unlike getSubmitValues(), this will return only the values corresponding to the elements added to the form and only the values that could actually be submitted: if we have 'Yes'/'No' radiobuttons 'Maybe' will not be considered a valid submit value. You also cannot get values for file elements via this method.


mixed $elementList

Array/string of element names, whose values we want. If not set then return all elements.

Return value

return An assoc array of elements' values


Possible PEAR_Error values
Error code Error message Reason Solution
QUICKFORM_NONEXIST_ELEMENT Element '$element' does not exist in HTML_QuickForm::exportValue() Tried to get a value of a non-existant element Check the element's name spelling


since 3.1

This function can not be called statically.

Returns the element's "safe" value (Previous) Returns the element's raw value (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.