Sruj
Sruj

Reputation: 1207

Symfony Form Component. What are all available options as 3rd argument of FormBuilderInterface::add() method

How do I know what all options are available as 3rd argument of FormBuilderInterface::add() in Symfony Form Component.

Upvotes: 0

Views: 38

Answers (1)

martin
martin

Reputation: 96891

It depends on what type of form field you're adding. Full list of default fields is here https://symfony.com/doc/current/forms.html#built-in-field-types and then all available options are listed in the documentation for each form field.

For example TextType has just a few basic ones https://symfony.com/doc/current/reference/forms/types/text.html.

On the other hand EntityType has it's own extra options and then inherits all options from its parents https://symfony.com/doc/current/reference/forms/types/entity.html.

Upvotes: 2

Related Questions