contao/test — Issue #1535: FormAuto::replaceFormAutoInsertTags without inline-css
Author: importer
Created: 2011-11-29 08:05:38+00:00
State: open
Labels: Feature, Invalid, plugins

hi!

i'm just using the formauto::all option - unfortunately it uses inline css in its output, thus rendering the generated html-code non-editable.

replacing

```

// {{formauto::all}}
if ($blnAutoCheck && strtolower($elements[0]) == 'formauto' && strtolower($elements[1]) == 'all')
{

$strAuto = '

' . $this->NL;

foreach ($this->arrFields as $key=>$field)
{
$strAuto .= $this->TB . '
' . $field['label'] . '	' . $arrDisplay[$key] . '
' . $this->NL;
}
$strAuto .= '

' . $this->NL;

$strValue = str_replace($tag, $strAuto, $strValue);

}

```

with something like

```

// {{formauto::all}}
if ($blnAutoCheck && strtolower($elements[0]) == 'formauto' && strtolower($elements[1]) == 'all')
{

$strAuto = '

' . $this->NL;

foreach ($this->arrFields as $key=>$field)
{
$strAuto .= $this->TB . '
' . $field['label'] . '	' . $arrDisplay[$key] . '
' . $this->NL;
}
$strAuto .= '

' . $this->NL;

$strValue = str_replace($tag, $strAuto, $strValue);

}

```

would be very much appreciated.

* the [nbsp] is arguable, but since empty-cells:show doesn't always work (poor CSS support in e-mail-clients) i'd leave that in.
* same with cellpadding and cellspacing.

the equivalent layouting would then be:

```
.formauto {width: 100%; border: 0; border-collapse: collapse; empty-cells: show;}
.formauto th { font-weight: bold; text-align:left; white-space:nowrap; width: 10%;}
.formauto td {font-weight: normal; width: 90%;}
```

greetings
axo

--- _Originally created by axo on February 9th, 2010, at 06:04pm (ID 1535)_