• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Return a view from a Filter?

#1
I have implemented a filter that runs reCAPTCHA v3 verification.  If the verification is successful, the post data is processed and e-mailed to the designated recipient(s).  If verification fails, I would like to return a view, but that doesn't seem to work. Instead, I am redirecting to an error page.  I would prefer that the error page not be accessible directly from a URL, so returning a view is preferable.  Is there a way to return a view directly from a filter, or is it necessary to use a redirect?
Reply

#2
I figured out a workaround, but I'm not sure if this is proper or just a hack:

PHP Code:
echo view('view_name');
exit(); 
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.