1

If I've got a model with some fields in it, is it possible for Symfony's form builder to introspect the fields and generate a form that contains all of those fields?

It seems that I'm repeating myself by having to create the entity and then create a form telling it to add all of the fields of the entity again.

1 Answer 1

2

I think you should have a look at this:

symfony-standard ➤ ./app/console help doctrine:generate:form                                                                       
Usage:
 doctrine:generate:form entity

Aliases: generate:doctrine:form
Arguments:
 entity  The entity class name to initialize (shortcut notation)

Help:
 The doctrine:generate:form command generates a form class based on a Doctrine entity.

 php app/console doctrine:generate:form AcmeBlogBundle:Post
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.