/**
  * @param form_persistentdocument_form $form
  * @param f_mvc_Request $request
  * @return String
  */
 protected function getSuccessView($form, $request)
 {
     $confirmpage = $form->getConfirmpage();
     if ($confirmpage instanceof website_persistentdocument_page && $confirmpage->isPublished()) {
         HttpController::getInstance()->redirectToUrl(LinkHelper::getDocumentUrl($confirmpage, $this->getLang(), array('formParam[id]' => $form->getId())));
         return website_BlockView::NONE;
     }
     $user = $this->getContext()->getGlobalContext()->getUser();
     $attr = 'form_success_parameters_' . $form->getId();
     $parameters = $user->getAttribute($attr);
     $user->removeAttribute($attr);
     $message = $form->getConfirmMessage();
     foreach ($parameters as $key => $value) {
         $message = str_replace('{' . $key . '}', htmlspecialchars($value), $message);
     }
     $request->setAttribute('message', $message);
     if ($form->getUseBackLink()) {
         $request->setAttribute('back', array('url' => $parameters['backUrl'], 'label' => f_Locale::translate('&modules.form.frontoffice.Back;')));
     } else {
         $request->setAttribute('back', false);
     }
     return $this->getSuccessTemplateByFullName($form);
 }