Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Form] Default values set according to another options don't work anymore for children #3354

Copy link
Copy link
Closed
@stof

Description

@stof
Issue body actions

Since the recent refactoring of the way default options are merged for a Form, setting a default value according to the value of another option does not work anymore for the hierarchy as the parent type will apply this default with its own default value even if the child type changed the default value. This is because the way the defaults are applied changed so the child type is applied only later.
A good way to see this is to define a type setting a default value for the data_class property. The empty_data default value set by the FieldType won't be set properly in the form (we would expect getting a closure crating an instance of the class).
This is a BC break and makes the type inheritance less powerful IMO.

/cc @bschussek

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.