protected function formSubmit($form)
    {
        try {
            $form->save();
            $self = $this;
            $this->app->addHook('pre-render', function () use ($self) {
                $self->formSubmitSuccess()->execute();
            });
        } catch (Exception_ValidityCheck $e) {
            $form->displayError($e->getField(), $e->getMessage());
        }
    }
protected function formSubmit($form)
    {
        try {
            $form->save();
            $self = $this;
            $this->app->addHook('pre-render', function () use ($self) {
                $self->formSubmitSuccess()->execute();
            });
        } catch (Exception_ValidityCheck $e) {
            $form->displayError($e->getField(), $e->getMessage());
        }
    }
protected function formSubmit ( $ form ) { try { $ form -> save ( ) ; $ self = $ this ; $ this -> app -> addHook ( 'pre-render' , function ( ) use ( $ self ) { $ self -> formSubmitSuccess ( ) -> execute ( ) ; } ) ; } catch ( Exception_ValidityCheck $ e ) { $ form -> displayError ( $ e -> getField ( ) , $ e -> getMessage ( ) ) ; } }
Called after on post-init hook when form is submitted.

@param Form $form Form which was submitted
Called after on post - init hook when form is submitted .