Bug #31920
closedForm element with attribute value "0"
100%
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
Updated by Jigal van Hemert about 13 years ago
- Status changed from New to Accepted
Updated by Chris topher almost 13 years ago
- Target version changed from 4.6.1 to 4.6.2
Updated by Gerrit Code Review almost 13 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
Updated by Gerrit Code Review about 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9021
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/9021
Updated by Gerrit Code Review over 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
Updated by Simon Praetorius over 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 } }
Updated by Gerrit Code Review almost 10 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
Updated by Stephan Großberndt almost 10 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.
Updated by Gerrit Code Review almost 10 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
Updated by Stefan Neufeind almost 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 82c96ecbeccfc1c0b86c13e04bf46f2890b2e012.
Updated by Björn Jacob over 9 years ago
- Category changed from Form Framework to 1602
- Is Regression set to No
Updated by Björn Jacob over 8 years ago
- Category changed from 1602 to Form Framework