Bug #36819

Element default values can't be set recursively

Added by Bastian Waidelich over 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2012-05-03
Priority:Should have Due date:
Assigned To:Bastian Waidelich % Done:

100%

Category:-
Target version:-

Description

Currently, if you use dots in the form element identifier in order to enable property mapping over multiple fields default values are no displayed as expected.
The reason is that the FormRuntime has no notion of "property paths" for default values.
So if you have a element with identifier "user.name", $formRuntime['user'] will return NULL instead of array('name' => 'some default value')

Thanks to Marc Neuhaus for reporting:

How to Reproduce:
Create a form with a property like "item.test" and set a default value.
The default value won't reach the textfield.

Associated revisions

Revision f7161e83
Added by Bastian Waidelich over 3 years ago

[!!!][BUGFIX] Default values can't be set recursively

Currently, if you use dots in the form element identifier in
order to enable property mapping over multiple fields default
values are no displayed as expected.
This change fixes this by storing all default values in the
FormDefinition as multidimensional array.

This is a breaking change only if you set a default value to
an form element before attaching the element to a form.
If you use the recommended syntax createElement() that will
work as before.

Change-Id: I0754cbbe70340b7f443a0ad368b292863bd065dc
Resolves: #36819

History

#1 Updated by Gerrit Code Review over 3 years ago

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

#2 Updated by Gerrit Code Review over 3 years ago

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

#3 Updated by Bastian Waidelich about 3 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF