How to add a new form to the Jobeet example?

2019-07-30 22:55发布

问题:

I did the Symfony 1.4 Jobeet example project and now i would like add an additional form.

How to do it correctly in a single project? Default Symfony itself generates the first form, but how can I create my own from scratch?

If i use in command line:

php symfony doctrine:build --forms

This generates only the default form, I would like to have two forms. How can I do it? Must I generate a new project?

回答1:

No, you do not need to create a new project. You can extend your test project by adding an additional form class. Just do like you did for your first form, but give it another classname and place it into a file of it's own.

You can do this test-wise by copying over your existing form file and rename both the filename and the classname.