public function setInitFormValues(array $values) {

		$this->initFormValues = $values;

		foreach($values as $name => $value) {
			if(isset($this->elements[$name]) && is_object($this->elements[$name])) {

				if($this->elements[$name] instanceof CheckboxElement) {
					if(empty($this->requestValues)) {
						$this->elements[$name]->setChecked($this->elements[$name]->getValue() == $value);
					}
					else {
						$this->elements[$name]->setChecked(!is_null($this->requestValues->get($name)));
					}
				}

				else if(is_null($this->elements[$name]->getValue())) {
					$this->elements[$name]->setValue($value);
				}
			}
		}

		return $this;

	}
public function setInitFormValues(array $values) {

		$this->initFormValues = $values;

		foreach($values as $name => $value) {
			if(isset($this->elements[$name]) && is_object($this->elements[$name])) {

				if($this->elements[$name] instanceof CheckboxElement) {
					if(empty($this->requestValues)) {
						$this->elements[$name]->setChecked($this->elements[$name]->getValue() == $value);
					}
					else {
						$this->elements[$name]->setChecked(!is_null($this->requestValues->get($name)));
					}
				}

				else if(is_null($this->elements[$name]->getValue())) {
					$this->elements[$name]->setValue($value);
				}
			}
		}

		return $this;

	}
public function setInitFormValues ( array $ values ) { $ this -> initFormValues = $ values ; foreach ( $ values as $ name => $ value ) { if ( isset ( $ this -> elements [ $ name ] ) && is_object ( $ this -> elements [ $ name ] ) ) { if ( $ this -> elements [ $ name ] instanceof CheckboxElement ) { if ( empty ( $ this -> requestValues ) ) { $ this -> elements [ $ name ] -> setChecked ( $ this -> elements [ $ name ] -> getValue ( ) == $ value ) ; } else { $ this -> elements [ $ name ] -> setChecked ( ! is_null ( $ this -> requestValues -> get ( $ name ) ) ) ; } } else if ( is_null ( $ this -> elements [ $ name ] -> getValue ( ) ) ) { $ this -> elements [ $ name ] -> setValue ( $ value ) ; } } } return $ this ; }
sets initial form values stored in associative array
values will only be applied to elements with previously declared value NULL
checkbox elements will be checked when their value equals form value

@param array $values
@return HtmlForm
sets initial form values stored in associative array values will only be applied to elements with previously declared value NULL checkbox elements will be checked when their value equals form value