Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB