Hallo,
ich will folgendes ändern in der Datei "system/modules/core/forms/Form.php". Wie und wo kann ich das updatesicher machen, ansonsten funktioniert, es so wir ich will. Oder gibt es einen anderen Weg, den ich im Moment nicht sehe? Habe mehrere Webseiten unter einem Contao laufen und möchte, dass bei den Formularen immer die entsprechende "danke.html" Seite aufgerufen mit dem entsprechenden Host.
Beispiel:
demo1.de/danke.html
demo2.de/danke.html
...
PHP-Code:
/**
* Generate the form
*
* @return string
*/
protected function compile()
{
...
$this->Template->hasError = $doNotSubmit;
$this->Template->attributes = $strAttributes;
$this->Template->enctype = $hasUpload ? 'multipart/form-data' : 'application/x-www-form-urlencoded';
$this->Template->formId = $arrAttributes[0] ?: 'f'.$this->id;
// $this->Template->action = \Environment::get('indexFreeRequest');
$this->Template->action = '/danke.html';
$this->Template->maxFileSize = $hasUpload ? $this->objModel->getMaxUploadFileSize() : false;
$this->Template->novalidate = $this->novalidate ? ' novalidate' : '';
// Get the target URL
if ($this->method == 'GET' && $this->jumpTo && ($objTarget = $this->objModel->getRelated('jumpTo')) !== null)
{
/** @var \PageModel $objTarget */
$this->Template->action = $objTarget->getFrontendUrl();
}
return $this->Template->parse();
}
Danke
Andreas
Lesezeichen