HTML_QuickForm::exportValues()

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 An assoc array of elements' values

例外・エラー

表 40-1PEAR_Error の値

Error codeError messageReasonSolution
QUICKFORM_NONEXIST_ELEMENTElement '$element' does not exist in HTML_QuickForm::exportValue()Tried to get a value of a non-existant elementCheck the element's name spelling

注意

since 3.1

この関数は、スタティックにコールする ことはできません。