Bug #55353
closedFound no way to set default value for form textarea
0%
Description
What works for simple text fields (that have a value attribute)
value { cObject = TEXT cObject.data = GP:parameter }
doesn’t for textarea fields (no value attribute, no way found to set data) …
If anybody knows how to set default values for textarea (or select) fields,
please let me know :-)
otherwise I see this issue as a severe bug
Updated by Björn Jacob over 9 years ago
- Category changed from Form Framework to 1602
Updated by Björn Jacob over 9 years ago
- Category changed from 1602 to Form Framework
Updated by Gerrit Code Review over 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42685
Updated by Ralf Zimmermann over 9 years ago
You can already do this with typoscript like this:
10 = TEXTAREA 10 { cols = 40 name = comment rows = 5 data = default value }
But "data" can not be rendered as contentelement.
I pushed a patch that make this possible.
With this patch you can do something like this:
10 = TEXTAREA 10 { cols = 40 name = comment rows = 5 data = TEXT data.value = x }
For documentation:
"data" can be used with TEXTAREA, TEXTBLOCK and OPTION.
Updated by Gerrit Code Review over 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42685
Updated by Ralf Zimmermann about 9 years ago
You can already do this with typoscript like this:
10 = TEXTAREA 10 { cols = 40 name = comment rows = 5 data = default value }
The rendering as contentelement is a security risk, because backend users are able to execute custom typoscript.
Updated by Markus Klein about 9 years ago
- Status changed from Under Review to Needs Feedback
- Target version deleted (
6.2.0)
Can this be closed?
Updated by Björn Jacob about 9 years ago
- Status changed from Needs Feedback to Closed
Yes, can be closed.
Updated by Oliver Hader about 9 years ago
As it already has been pointed out - data
is used instead of value
for the Form Objects TEXTAREA
, TEXTBLOCK
and OPTION
Thus, I suggest to deprecated data
for those three object and use value
as default value - as it is being used for all other objects.