Skip to content

[Form] Virtual functionality seems doesn't work #4385

Closed
@webda2l

Description

@webda2l

Hi,

The new version of the Form API break my forms using the virtual functionality.
Whereas my code seems correct and work well before.

HomepageLocalType :

$builder->add('homepage', new HomepageType(), array(
     'virtual' => true
 ));

Error :

Neither property "homepage" nor method "getHomepage()" nor method "isHomepage()" exists in class "[...]\Entity\HomepageLocal"

The second solution to define a virtual form, directly with getDefaultOptions() in HomepageType() give the same result.

Nobody else have this issue?

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