External Form Redirect After Success

Permalink
How can I set a redirect URL on success with an external form?

Right now my form sends if there is no errors, this is from the controller:
if(empty($errors)) {
            $body .= 'Name: ' . $input['name'] . "\r\n";
            $body .= 'Email: ' . $input['email'] . "\r\n";
            $body .= 'Phone: ' . $input['phone'] . "\r\n";
            $mail->setSubject('Subject');
            $mail->setBody($body);
            $mail->to('web@site.com', 'Receiver');
            $mail->from('site@site.com', 'Site');
            $mail->replyto($input['email'], $input['name']);
            $mail->sendMail();
            $this->set('response', true);
            return true;
        }
.)

ob7dev
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi ob7,

You could look into using redirect().
$this->redirect('/path/to/page');

Where are you trying to redirect the page and do you need something to happen besides the redirect?