Bug #43893
closed
selected = 1 doesn't work in class.tslib_content_form.php
Added by Thorsten Menkenhagen over 11 years ago.
Updated almost 7 years ago.
Description
When I change
$selected = isset($singleKeyArray['selected.'])
? $this->cObj->stdWrap($singleKeyArray['selected'], $singleKeyArray['selected.'])
: $singleKeyArray['selected'];
in Line 107 to
$selected = isset($singleKey_valueArray['selected.'])
? $this->cObj->stdWrap($singleKey_valueArray['selected'], $singleKey_valueArray['selected.'])
: $singleKey_valueArray['selected'];
then everything is okay.
I can confirm this. The same problem exists in TYPO3 v4.7.
The suggested fix works for me, too.
Could you provide a more detailed description how to test/reproduce this?
I guess it also occurs in 6.0, even if the code looks completely different there
Test TypoScript:
page = PAGE
temp.mailform = FORM
temp.mailform {
dataArray {
20.label = Foobar
20.type = test=select
20.valueArray {
10.label = Blue
10.value = 1
20.label = Red
20.value = 2
20.selected = 1
}
}
recipient = info@example.com
layout = <div class="some-class">###LABEL### ###FIELD###</div>
}
page.10 < temp.mailform
I can confirm this still happens in 6.0, although the TYPO3\CMS\Frontend\ContentObject\FormContentObject seems not to be used at all if the new EXT:form is installed.
However, the suggested fix makes sense and is pretty easy to implement.
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF