Previous Page
setValue()

Solar_Form
setValues()

Next Page
validate()

setValues()

public void setValues ( array $data, string $array default NULL )

Manually set the value of several elements.

Parameters

  • (array) $data: An associative array where the key is the element name and the value is the element value to set.
  • (string) $array: Rename each element as a key in this array.

Returns

  • (void)

Description

Manually set the value of several elements.

Note that this is subtly different from populate(). This method takes a flat array where the full name of the element is the key, whereas populate() takes a "natural" hierarchical array like $_POST.