![]() |
|
Snippets |
|
When using fillin filter, after validation success (all form fields are ok) if you want display page without form, fillin filter is still enabled and throws exception "Exception - No form found in this page". Use this snippet to prevent it.
in sfFillInFormFilter.class.php file
public function execute($filterChain) { // execute next filter $filterChain->execute(); $context = $this->getContext(); $response = $context->getResponse(); $request = $context->getRequest(); // add these two lines if(! $request->hasErrors()) return;