事实上,我有一个表格,其中含有关于持续实体的输入。我想在其他地方创建另一种表格,其中含有更多信息,我想将所有内容从第一种形式的提交书中拯救出来。我无法以同样的形式纳入第二种输入,因为这并不是同一个观点。解决这一问题的最佳方法是什么?
提前感谢
事实上,我有一个表格,其中含有关于持续实体的输入。我想在其他地方创建另一种表格,其中含有更多信息,我想将所有内容从第一种形式的提交书中拯救出来。我无法以同样的形式纳入第二种输入,因为这并不是同一个观点。解决这一问题的最佳方法是什么?
提前感谢
这听起来很困难
我是否理解这一权利:
您在实体上拥有一些必需的信息和一些无效的补充信息。
现在有两种表格,一种是用所需信息创建实体,而另一种是用附加信息更新表格。
是这样吗?
我会尝试两件事:
Default You create one FormType with all the fields and have two views which only render the required fields (for this don t use form_rest). Than do the form handling like descriped in the docs. It could be that this doesn t work with the validation.
Use FormModels Under Form/Model/FormModelClass you have the two classes which only have the attributes the one form requires. The Form component interacts with them and maps all attributes to this models. When the form is submitted successfullly and valid you can manuelly map the attributes back to your orginal entity and persist it
I develop a symfony project and everything was fine. But since yesterday I can not launch the server: enter image description here The commands symfony server:start and symfony server:stop don t work ...
I spent some time reading through Symfony 6.x and Twig 3.x docs. I couldn t find anything about linking to HTML id attributes via the twig templating engine to accomplish smooth scrolling on the same-...
I know that the architecture is different in symfony 2.0 but im learning 1.4 right now. I wonder if this knowledge i gain about 1.4 will be usable for 2.0 in some extent or will it be a total waste ...
I wonder if Symfony 2.0 is stable enough to use? Because I ve never used Symfony before. It seems that Symfony 2 is much better than the previous version and I don t want to relearn/recode ...
I m going to start a new project that s building web apps from scratch. I have been thinking about using symfony framework for this project. Should I start using symfony 2.0 or stick with 1.4 ? I ...
I would like to know how to increase the session timeout in symfony. Is it enough to only adjust the symfony configuration settings or must I also configure anything in my php.ini file?
Well, I know it s a preview, and I know it says that it s not yet ready for production, and yet I dare ask the question. I need to start building a pretty big application, which is planned to go live ...
Like in classic PHP we use the magic variables to start and create sessions, so how to do that in Symfony?