Project

General

Profile

Actions

Bug #55353

closed

Found no way to set default value for form textarea

Added by Wolfgang Klinger about 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2014-01-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Feature #38163: Allow stdWrap on form-defaultvaluesClosedStefan Neufeind2012-06-19

Actions
Related to TYPO3 Core - Task #69369: EXT:form - Use property value instead of data for TEXTAREA, TEXTBLOCK, OPTIONClosed2015-08-27

Actions
Actions #1

Updated by Mathias Schreiber about 9 years ago

  • Category set to Form Framework
Actions #2

Updated by Björn Jacob over 8 years ago

  • Category changed from Form Framework to 1602
Actions #3

Updated by Björn Jacob over 8 years ago

  • Category changed from 1602 to Form Framework
Actions #4

Updated by Gerrit Code Review over 8 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

Actions #5

Updated by Ralf Zimmermann over 8 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.

Actions #6

Updated by Gerrit Code Review over 8 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

Actions #7

Updated by Ralf Zimmermann over 8 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.

Actions #8

Updated by Markus Klein over 8 years ago

  • Status changed from Under Review to Needs Feedback
  • Target version deleted (6.2.0)

Can this be closed?

Actions #9

Updated by Björn Jacob over 8 years ago

  • Status changed from Needs Feedback to Closed

Yes, can be closed.

Actions #10

Updated by Oliver Hader over 8 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.

Actions

Also available in: Atom PDF