[Neos] Typo3.Form Neos Question
nikos
nick at jamalade.com
Wed May 21 17:37:47 CEST 2014
Hi again
Sorry to be a pain but really would appreciate a little bit of direction with this.
It might help to get an idea of how to use the the RedirectFinisher to show another page on completion?
I have been searching around for this for a few days with no luck:(
Many thanks in advance
Nikos
On 20/05/2014 22:30, nikos wrote:
> Hi all
>
> I am using Typo3.Form in my Neos based website and I am wondering what is the best way to display a link back to display the form again in the event
> of an error that may occur in a finisher. The use case I am thinking of is when I am using an EmailFinisher and there is an error e.g. can't connect
> to the smtp email server. I would like to present a message informing the website visitor that there was a problem and that they may wish to resend
> the form providing them with a link to the page with the form.
>
> At the moment I have provided my own EmailFinisher and I am able to respond with a message but no link. I have implement this by catching the
> exception raised from the Swiftmail send in my EmailFinisher executeInternal method, setting the response and cancelling further finishers with this
> snipet:
>
> try {
> $mail->send();
> } catch (\Exception $exception) {
> // throw new \TYPO3\Form\Exception\FinisherException('Unable to send email', 1327060223, $exception);
> // email failed to send for some reason so rather than spew over fe show an on error message and stop other finishers
>
> $response = $formRuntime->getResponse();
> $response->setContent($this->parseOption('onErrorMessage'));
> $this->finisherContext->cancel();
> }
>
> But I am unsure how to get a link (uri) to the originating page.
>
> Hope someone is able to help.
>
> Many thanks
>
> Nikos
More information about the Neos
mailing list