Bug #55353
closed
Found no way to set default value for form textarea
Added by Wolfgang Klinger almost 11 years ago.
Updated about 9 years ago.
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
- Category set to Form Framework
- Category changed from Form Framework to 1602
- Category changed from 1602 to Form Framework
- 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
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.
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
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.
- Status changed from Under Review to Needs Feedback
- Target version deleted (
6.2.0)
- Status changed from Needs Feedback to Closed
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.
Also available in: Atom
PDF