Task #69369

Epic #69347: EXT:form - Optimize form wizard

EXT:form - Use property value instead of data for TEXTAREA, TEXTBLOCK, OPTION

Added by Oliver Hader about 4 years ago. Updated almost 2 years ago.

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

100%

TYPO3 Version:
7
PHP Version:
5.5
Tags:
Complexity:
easy
Sprint Focus:

Description

The Form Objects (system extension "form") TEXTAREA, TEXTBLOCK, OPTION currently use data as property name to define default values. However, all other objects use value. Since data implies the possibility to use computed values, it shall be deprecated and value used instead.


Related issues

Related to TYPO3 Core - Bug #55353: Found no way to set default value for form textarea Closed 2014-01-27
Related to TYPO3 Core - Feature #69409: Forms: allow value attribute of OPTION object in wizard Closed 2015-08-29
Related to TYPO3 Core - Bug #69957: EXT:form - Fix some problems with Container elements Closed 2015-09-24

Associated revisions

Revision e4107cea (diff)
Added by Andreas Häfner almost 4 years ago

[TASK] EXT:form - Use text instead of data attributes

The form objects TEXTBLOCK, OPTION and TEXTAREA now use text as
attribute for textual content.

Furthermore, the patchset fixes a bug with duplicated select boxes.

The missing deprecation file from #69957 is added as well.

Resolves: #69369
Resolves: #70448
Releases: master
Change-Id: I99d3d1292dc143989a8483d14fc5d827bd05a560
Reviewed-on: https://review.typo3.org/43895
Reviewed-by: Bjoern Jacob <>
Tested-by: Bjoern Jacob <>
Reviewed-by: Philipp Gampe <>
Tested-by: Philipp Gampe <>

History

#1 Updated by Bjoern Jacob about 4 years ago

Just an addition: TEXTBLOCK uses "content" instead of "data". Anyway, it should be used "value" instead.

#2 Updated by Bjoern Jacob about 4 years ago

We've discussed the whole issue and came to the conclusion to use "text" as the new attribute. According to this the TS should look like this:


10 = OPTION
10 {
    value = technical value
    text = human readable text inside tag (former .data)
}

20 = TEXTAREA
20 {
    label = Rendered as label tag
    text = human readable text inside tag (former .data)
}

30 = TEXTBLOCK
30 {
    text = <p>Could be HTML</p> (former .content)
}

#3 Updated by Bjoern Jacob almost 4 years ago

  • Subject changed from Use property value instead of data for TEXTAREA, TEXTBLOCK, OPTION to EXT:form - Use property value instead of data for TEXTAREA, TEXTBLOCK, OPTION
  • Priority changed from Should have to Must have
  • Target version set to 7 LTS
  • Sprint Focus set to On Location Sprint

This has partly been fixed with #69957. We need to create a .rst file for the deprecation and have to adapt the form wizard.

#4 Updated by Bjoern Jacob almost 4 years ago

  • Parent task set to #69347

#6 Updated by Bjoern Jacob almost 4 years ago

  • Status changed from New to In Progress

#7 Updated by Gerrit Code Review almost 4 years ago

  • Status changed from In Progress 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/43895

#8 Updated by Gerrit Code Review almost 4 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/43895

#9 Updated by Gerrit Code Review almost 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#10 Updated by Gerrit Code Review almost 4 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#11 Updated by Gerrit Code Review almost 4 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#12 Updated by Gerrit Code Review almost 4 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#13 Updated by Gerrit Code Review almost 4 years ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#14 Updated by Gerrit Code Review almost 4 years ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#15 Updated by Bjoern Jacob almost 4 years ago

Example form for testing this issue:


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1
layout {
    containerWrap (
        <dl class="containerWrap">
            <elements />
        </dl>
    )
}
postProcessor {
    1 = mail
    1 {
        recipientEmail = your@mail.com
        senderEmail = your@mail.com
    }
}
10 = SELECT
10 {
    name = select1
    label {
        value = Select 1
    }
    10 = OPTION
    10 {
        # has to be converted to text automatically after saving in wizard
        data = Option 12
        value = Value 15
    }
    20 = OPTION
    20 {
        # has to be converted to text automatically after saving in wizard
        data = Option 23
        value = Value 26
    }
    30 = OPTION
    30 {
        text = Option 34
        value = Value 37
    }
    40 = OPTION
    40 {
        text = New option1
        value = Value2
    }
}
20 = TEXTAREA
20 {
    cols = 40
    name = textarea1
    rows = 5
    # has to be converted to text automatically after saving in wizard
    data = I am text.
    label {
        value = Textarea 1
    }
}
30 = TEXTAREA
30 {
    cols = 40
    name = textarea2
    rows = 5
    text = I am text.
    label {
        value = Textarea 2
    }
}
40 = TEXTBLOCK
40 {
    # has to be converted to text automatically after saving in wizard
    content = I am even more text 1.
}
50 = TEXTBLOCK
50 {
    text = I am even more text 2.
}
60 = SUBMIT
60 {
    name = submit
    type = submit
    value = Submit form
}

#16 Updated by Gerrit Code Review almost 4 years ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#17 Updated by Gerrit Code Review almost 4 years ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43895

#18 Updated by Anonymous almost 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#19 Updated by Anja Leichsenring over 3 years ago

  • Sprint Focus deleted (On Location Sprint)

#20 Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF