We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Techniques for Numbering Nested Forms in Phoenix LiveView
15
clicks

Source: arrowsmithlabs.com
The content explains how to implement numbering for nested forms in Phoenix LiveView, using a recipe creation/editing form as an example. It highlights the challenge of numbering ingredients using <.inputs_for /> and showcases how to leverage the index attribute from the ingredient_f variable to display a user-friendly incrementing number. The author addresses a bug where numbers may become misordered after rearranging inputs and provides a solution to ensure LiveView updates correctly after drag-and-drop actions using Sortable.js. The article serves as a practical guide for developers looking to enhance their forms in Phoenix LiveView.
Related posts
© HashMerge 2025