I have an app that I have a model that supports multiple add开发者_开发知识库resses, but upfront I only want to allow the user to add/edit one address.
User
----
UserId
Address
----
UserId
Line1
...
I have the following to render the form for adding a new address, but how about existing records? What do I need to add to my configure method in the User form?
    $this->embedForm("address", new AddressForm());
Take a look at More with Symfony: Advanced Forms. This chapter outlines a good way to embed multiple forms when dealing with 1-to-many relationships and should more than cover explaining what you need to do.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论