LoadFormField über GET parameter Feldern abfüllen
Hallo
Ich möchte gerne mittels einen Link dem Formular Feldern abfüllen.
http://motorvillage.factum.ch/kontak...ahrt&auto=MITO
Im Datei: localconfig.php habe ich diese Zeile hinzugefügt:
Code:
$GLOBALS['TL_HOOKS']['loadFormField'][] = array('contactform', 'myLoadFormField');
Und im Verzeichnis modules/frontend dem Datei contactform.php erstellt.
Mit dem Inhalt:
Code:
<?php
public function myLoadFormField(Widget $objWidget, $strForm, $arrForm)
{
if ($objWidget->name=="fahrzeug-modell")
{
$objWidget->value = $_GET["auto"];
}
return $objWidget;
}
?>
Aber ich bekomme diese fehlermedlung:
Parse error: syntax error, unexpected T_PUBLIC in /home/www-data/motorvillage.factum.ch/system/modules/frontend/contactform.php on line 3
Was mache ich falsch??
Grüsse Rogier