src/fieldwork/Form.php
function setValues (array $values = array())
    {
        foreach ($this->getFields() as $field)
            if (array_key_exists($field->getName(), $values))
                $field->setValue($values[$field->getName()]);
        foreach ($this->dataFields as $dataKey => $dataVal)
            if (array_key_exists($dataKey, $values))
                $this->dataFields[$dataKey] = $values[$dataKey];
    }
function setValues (array $values = array())
    {
        foreach ($this->getFields() as $field)
            if (array_key_exists($field->getName(), $values))
                $field->setValue($values[$field->getName()]);
        foreach ($this->dataFields as $dataKey => $dataVal)
            if (array_key_exists($dataKey, $values))
                $this->dataFields[$dataKey] = $values[$dataKey];
    }
function setValues ( array $ values = array ( ) ) { foreach ( $ this -> getFields ( ) as $ field ) if ( array_key_exists ( $ field -> getName ( ) , $ values ) ) $ field -> setValue ( $ values [ $ field -> getName ( ) ] ) ; foreach ( $ this -> dataFields as $ dataKey => $ dataVal ) if ( array_key_exists ( $ dataKey , $ values ) ) $ this -> dataFields [ $ dataKey ] = $ values [ $ dataKey ] ; }
Restores the values from an associated array. Only defined properties will be overwritten

@param array $values
Restores the values from an associated array . Only defined properties will be overwritten