src/ItePHP/Component/Form/FormBuilder.php
public function setData($data){
		$data=$this->transformer->encode($data);
		foreach($this->fields as $field){
			if(isset($data[$field->getName()])){
				$field->setData($data[$field->getName()]);
			}
		}
	}
public function setData($data){
		$data=$this->transformer->encode($data);
		foreach($this->fields as $field){
			if(isset($data[$field->getName()])){
				$field->setData($data[$field->getName()]);
			}
		}
	}
public function setData ( $ data ) { $ data = $ this -> transformer -> encode ( $ data ) ; foreach ( $ this -> fields as $ field ) { if ( isset ( $ data [ $ field -> getName ( ) ] ) ) { $ field -> setData ( $ data [ $ field -> getName ( ) ] ) ; } } }
Set default values for fields

@param mixed[] $data eg:
[
'{text field name 1}'=>'{text value name 1}'
,'{text field name 2}'=>'{text value name 2}'
]
Set default values for fields