Project

General

Profile

Actions

Bug #31920

closed

Form element with attribute value "0"

Added by Arjen Hoekema over 12 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2011-11-18
Due date:
% Done:

100%

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

Description

It should be possible to create form fields/elements with attributes containing "0".

Currently all attributes are checked with "empty()" which returns false upon 0 and "0".

Functions which contain "empty()" check:
tx_form_View_Form_Element_Abstract->setAttribute
tx_form_View_Form_Element_Abstract->setAttributes
tx_form_View_Form_Element_Abstract->setAttributeWithValueofOtherAttribute


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #64359: sysExt:Form Renders all Fields as Text InputClosed2015-01-19

Actions
Actions #1

Updated by Jigal van Hemert over 12 years ago

  • Status changed from New to Accepted
Actions #2

Updated by Jigal van Hemert over 12 years ago

  • Target version set to 4.6.1
Actions #3

Updated by Chris topher over 12 years ago

  • Target version changed from 4.6.1 to 4.6.2
Actions #4

Updated by Xavier Perseguers over 12 years ago

  • Target version deleted (4.6.2)
Actions #5

Updated by Gerrit Code Review over 12 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9021

Actions #6

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9021

Actions #7

Updated by Gerrit Code Review over 11 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9021

Actions #8

Updated by Gerrit Code Review about 11 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9021

Actions #9

Updated by Simon Praetorius almost 10 years ago

Unfortunately this bug is still present in 6.2.4. Was one of the patches applied back then?

Current workaround (which breaks each time you use the visual editor):

10 = TEXTLINE
10 {
    name = fieldname
    value (
0
)
    label {
        value = Field title
    }
}
Actions #10

Updated by Gerrit Code Review over 9 years ago

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

Actions #11

Updated by Stephan Großberndt over 9 years ago

The issue is still present in TYPO3 7 and 6.2, but the patches before patch set 5 did not help..
It isn't possible in the form wizard to set default values for inputs.

To test/replicate: create a new form with the following content:

prefix = tx_form
10 = TEXTLINE
10 {
    name = test1
    value = 10
    label {
        value = test1
    }
}
20 = TEXTLINE
20 {
    name = test2
    value = 0
    label {
        value = test2
    }
}

Expected: input test2 has a default value of "0", but is empty ("") instead. patch set 5 solves this.

Actions #12

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35443

Actions #13

Updated by Stefan Neufeind over 9 years ago

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

Updated by Björn Jacob almost 9 years ago

  • Category changed from Form Framework to 1602
  • Is Regression set to No
Actions #15

Updated by Björn Jacob about 8 years ago

  • Category changed from 1602 to Form Framework
Actions #16

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF