original_string: 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());
          }
      }
code: 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());
          }
      }
code_tokens: 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 ( ) ) ; } }
docstring: Called after on post-init hook when form is submitted.
  
  @param Form $form Form which was submitted
docstring_tokens: Called after on post - init hook when form is submitted .