Closed stefanheimes closed 8 years ago
Hi,
i have a problem with the Form::addFormField function. (https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php#L363)
If I use the FormExplanation Widget, the field need a text value in the dca but in this line: https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php#L450 you use the getAttributesFromDca which removes this field from the dca. So the FormExplanation won't get the text value.
A solution would be to merge the result from the $strClass::getAttributesFromDca and the current $arrDca.
$strClass::getAttributesFromDca
$arrDca
Maybe it is a missing function in the contao/core getAttributesFromDca function. But i am not sure.
The code should look like this:
'eval' => ['text' => 'Text explanation']
You are right. Thx.
Hi,
i have a problem with the Form::addFormField function. (https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php#L363)
If I use the FormExplanation Widget, the field need a text value in the dca but in this line: https://github.com/codefog/contao-haste/blob/master/library/Haste/Form/Form.php#L450 you use the getAttributesFromDca which removes this field from the dca. So the FormExplanation won't get the text value.
A solution would be to merge the result from the
$strClass::getAttributesFromDca
and the current$arrDca
.