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:
.)
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; }
You could look into using redirect().
Where are you trying to redirect the page and do you need something to happen besides the redirect?