Create a Form with Multiple Associations
Learn how to create a Phoenix form with multiple associations.
We'll cover the following...
We'll cover the following...
Add support for multiple addresses
Let’s take this one step further. In the last example, we worked with a single address via the embeds_one
association. Let’s try adding support for multiple addresses (embeds_many
).
The process is similar to having a single address. The inputs_for
function is smart enough to handle associations with one record or many records—it will always generate as many ...