src/Forms/FieldList.php
public function setValues($data)
    {
        foreach ($this->dataFields() as $field) {
            $fieldName = $field->getName();
            if (isset($data[$fieldName])) {
                $field->setValue($data[$fieldName]);
            }
        }
        return $this;
    }
public function setValues($data)
    {
        foreach ($this->dataFields() as $field) {
            $fieldName = $field->getName();
            if (isset($data[$fieldName])) {
                $field->setValue($data[$fieldName]);
            }
        }
        return $this;
    }
public function setValues ( $ data ) { foreach ( $ this -> dataFields ( ) as $ field ) { $ fieldName = $ field -> getName ( ) ; if ( isset ( $ data [ $ fieldName ] ) ) { $ field -> setValue ( $ data [ $ fieldName ] ) ; } } return $ this ; }
Load the given data into this form.

@param array $data An map of data to load into the FieldList
@return $this
Load the given data into this form .