new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::OPTIONAL, 'string' ), 'zip' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::OPTIONAL, 'number_int' ), 'city' => new ezcInputFormDefinitionElement( ezcInputFormDefinitionElement::OPTIONAL, 'string' ), ); $form = new ezcInputForm( INPUT_POST, $definition ); if ( $form->hasValidData( 'street' ) === true && $form->hasValidData( 'city' ) === true && $form->hasValidData( 'zip' ) ) { $session = ezcPersistentSessionInstance::get(); $this->address = new ezcappContactAddress(); $this->address->street = $form->street; $this->address->zip = $form->zip; $this->address->city = $form->city; $session->save( $this->address ); $this->template = "createaddresssuccess"; } } public function getTemplate() { return $this->template; } } ?>