17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1567 Views |
-
Form Confirmation - redirect to another page

10 March 2008 at 5:01pm
I need to redirect people who submit a form to another website. How do I do that? Currently It looks like there is only one option which is to manually enter some text. I NEED it to redirect otherwise it will be messy.
THANKS!
-
Re: Form Confirmation - redirect to another page

10 March 2008 at 5:23pm
A hackish way:
Subclass UserDefinedForm and UserDefinedForm_Controller.
In SubClass_Controller, basically c+p the process method from UserDefinedForm_Controller, except replace:
$custom = $this->customise(array(
"Content" => $this->customise( array( 'Link' => $data['Referrer'] ) )->renderWith('ReceivedFormSubmission'),
"Form" => " ",
));return $custom->renderWith('Page');
With
Director::redirect('URL');
I think that will work. (:
-
Re: Form Confirmation - redirect to another page

12 March 2008 at 2:50pm
Thanks for your help... But... I'm not very techie and I need to know where to put that code as well.. which file?
Thanks again!
-
Re: Form Confirmation - redirect to another page

12 March 2008 at 4:50pm Last edited: 12 March 2008 4:52pm
I just made a page type with a customisable redirect URL.
Just extract, and upload RedirectForm.php to mysite/code/ then run db/build?flush=1
And since attaching didn't seem to work: http://simon.geek.nz/code/RedirectForm.tar.gz
| 1567 Views | ||
|
Page:
1
|
Go to Top |

