Inheritance: extends SpoonForm
Example #1
0
 /**
  * Parse the form
  *
  * @param \SpoonTemplate $tpl The template instance wherein the form will be parsed.
  */
 public function parse($tpl)
 {
     // parse the form
     parent::parse($tpl);
     // validate the form
     $this->validate();
     // if the form is submitted but there was an error, assign a general error
     if ($this->isSubmitted() && !$this->isCorrect()) {
         $tpl->assign('formError', true);
     }
 }