Formulargenerator - ModuleListing.php
Hallo,
ich habe ein Formular mit Formauto erstellt und speichere die Daten in einer Tabelle, was auch gut funktioniert.
Darunter ist auch ein Bild, eine eMail und ein Weblink.
Jetzt lasse ich mir die Daten im Frontend anzeigen mit dem Listing Module und dem Standard Template (list_default.html5)
Leider wird dabei weder das Bild dargestellt, noch wird der Weblink / eMail als Link dargestellt.
Daraufhin habe ich mir die ModuleListing.php angeschaut und festgestellt, dass die Funktion zwar aufgerufen wird, aber die Links nicht erstellt werden, es sieht so aus, als ob dieser Aufruf nicht richtig ist.
PHP-Code:
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'email')
Kann mir jemand einen Rat geben, wie ich das ändern kann.
Danke!
PHP-Code:
protected function formatValue($k, $value, $blnListSingle=false)
{
$value = deserialize($value);
// Return if empty
if (empty($value))
{
return '';
}
global $objPage;
// Array
if (is_array($value))
{
$value = implode(', ', $value);
}
// Date
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'date')
{
$value = \Date::parse($objPage->dateFormat, $value);
}
// Time
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'time')
{
$value = \Date::parse($objPage->timeFormat, $value);
}
// Date and time
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'datim')
{
$value = \Date::parse($objPage->datimFormat, $value);
}
// URLs
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'url' && preg_match('@^(https?://|ftp://)@i', $value))
{
global $objPage;
$value = \Idna::decode($value); // see #5946
$value = '<a href="' . $value . '"' . (($objPage->outputFormat == 'xhtml') ? ' onclick="return !window.open(this.href)"' : ' target="_blank"') . '>' . $value . '</a>';
}
// E-mail addresses
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['rgxp'] == 'email')
{
$value = \String::encodeEmail(\Idna::decode($value)); // see #5946
$value = '<a href="mailto:' . $value . '">' . $value . '</a>';
}
// Reference
elseif (is_array($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['reference']))
{
$value = $GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['reference'][$value];
}
// Associative array
elseif ($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['eval']['isAssociative'] || array_is_assoc($GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['options']))
{
if ($blnListSingle)
{
$value = $GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['options'][$value];
}
else
{
$value = '<span class="value">[' . $value . ']</span> ' . $GLOBALS['TL_DCA'][$this->list_table]['fields'][$k]['options'][$value];
}
}
return $value;
}
}
Formulargenerator - Formauto Backend
Hallo,
was mir gerade auch aufgefallen ist, dass wenn ich mir die Daten im Backend anschaue und dann ändere und auf speichern gehe, der Upload Link geändert wird und das es nicht möglich ist einen anderen Link anzugeben, sobald ich dies mache, kommt folgende Fehlermeldung im Log.
Details: Could not load the data container configuration for "form_angebote" // ( Die Tabelle form_angebote habe ich mit Formauto erstellt.
Funktion: DC_Table __construct()
Danke
Andreas