August 2025
Intermediate to advanced
294 pages
6h 59m
English
We want to manage tracks via the form for managing an album, so a lot of the code we’ll be writing will be in the TunezWeb.Albums.FormLive liveview module. There’s a track_inputs/1 function component already defined in the liveview, for rendering a table of tracks for the album using Phoenix’s standard inputs_for[149] component. This component will iterate over the data in @form[:tracks] and render a row of input fields for each item in the list.
Add the track_inputs/1 component to the form at the bottom of the main render/1 action, right above the Save button:
| | <% # ... %> |
| | <.input field={form[:cover_image_url]} label="Cover Image URL" /> |
| |
Read now
Unlock full access