Skip to content

[Form] Choice List in a Form #3468

Closed
Closed
@umpirsky

Description

@umpirsky

Hi.

Here is my form ProductType and this is how I use it in action.

I expect it to render available categories in choice list, but it renders text field for category, I read the doc, and this article, and tried the same, but all I get is a text field for category.

It renders available categories in choice list only if I remove getDefaultOptions() from ProductType and explicitly pass Product as a second parameter to $this->createForm(), but I guess that is not the right way to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FormGood first issueIdeal for your first contribution! (some Symfony experience may be required)Unconfirmed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions