HTML_QuickForm::setDefaults()

HTML_QuickForm::setDefaults() – Sets default form values

Synopsis

require_once 'HTML/QuickForm.php';

void HTML_QuickForm::setDefaults ( array $defaultValues = null , mixed $filter = null )

Description

Sets default form values. There are overriden by either constant (set via setConstants()) or submitted (POST or GET) values.

Parameter

array $defaultValues

values used to fill the form, array('element name' => 'element value')

mixed $filter

(optional) filter(s) to apply to all default values

Throws

Possible PEAR_Error values
Error code Error message Reason Solution
QUICKFORM_INVALID_FILTER Callback function does not exist in QuickForm::setDefaults() Tried to pass a name of a non-existant function as a callback Check spelling

Note

since 1.0

This function can not be called statically.

Sets constant form values (Previous) Tells whether the form was already submitted (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.