Загрузка...

Advanced Forms with Embedded Schemas and Multi: Phoenix App from Scratch, Episode 9

[series] Build a complete budget tracking app in Phoenix LiveView!

In this episode, we explore advanced form patterns using embedded schemas and Ecto.Multi to create a seamless budget creation experience with automatic monthly funding!

Along the way, we'll cover:
- Building forms that go beyond simple database models
- Using embedded schemas for complex form validation
- Implementing multi-step database transactions with Ecto.Multi
- Handling optional form fields gracefully
- Database transaction rollbacks

Links
Screen recording software I use (affiliate): https://screen.studio/@Yy75o
Project repo: https://github.com/ChristianAlexander/tutorial-budget-app
Related changes: https://github.com/ChristianAlexander/tutorial-budget-app/pull/16

Related Documentation
Ecto Embedded Schemas: https://hexdocs.pm/ecto/embedded-schemas.html
Ecto.Multi: https://hexdocs.pm/ecto/Ecto.Multi.html
Phoenix.Component.inputs_for: https://hexdocs.pm/phoenix_live_view/Phoenix.Component.html#inputs_for/1

Timestamps
Context / The Problem - 00:00
Embedded Schema - 01:42
Refactor into a Form Module - 02:21
A New Field - 04:45
Ecto Multi - 05:53
Our Own Multi - 07:05
Handling a Null - 10:16
What's the Point? - 12:07

Видео Advanced Forms with Embedded Schemas and Multi: Phoenix App from Scratch, Episode 9 канала Code and Stuff
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять