liveview-forms

Build resilient Phoenix LiveView forms with Ecto changesets and validation.

19|4|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/wunki/amplify --skill liveview-forms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: liveview-forms
Source: https://github.com/wunki/amplify/tree/main/skills/liveview-forms
Command: npx skills add https://github.com/wunki/amplify --skill liveview-forms

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of correct, resilient forms in Phoenix LiveView, handling complex validation, error feedback, and recovery scenarios to prevent common pitfalls.

Core Features & Use Cases

  • Full Form Lifecycle Management: Covers mounting, validation, submission, and error handling.
  • Robust Error Feedback: Implements a two-layer system for clear error display using changeset actions and used_input?/1.
  • Reconnect Recovery: Ensures forms automatically recover state after network interruptions.
  • Advanced Features: Supports nested forms, file uploads, debouncing/throttling, and component forms.
  • Use Case: When building a user registration form in LiveView, use this Skill to ensure proper validation, display errors only for fields the user has touched, and automatically recover form data if the user's connection drops mid-entry.

Quick Start

Use the liveview-forms skill to build a form that validates user input on change and recovers data after a disconnect.

Frequently Asked Questions about liveview-forms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle Phoenix LiveView form validation and display errors only for touched fields?

Phoenix LiveView form validation can track touched fields by combining Ecto changeset actions with the `used_input?/1` function. This two-layer error feedback model ensures clear error display only for fields the user has actually interacted with.

What is the best way to recover Phoenix LiveView form data after a network disconnect?

Recovering LiveView form data after a network disconnect relies on the `phx-auto-recover` mechanism. This ensures forms automatically recover their state and user input data when the connection is restored after network interruptions.

How do I build nested forms and handle file uploads in Phoenix LiveView?

Building nested forms and handling file uploads in Phoenix LiveView involves utilizing Ecto changesets and `to_form/2` to manage complex form structures. These advanced features are supported alongside input debouncing and throttling for robust component forms.

Does Phoenix LiveView support debouncing and throttling for form inputs?

Phoenix LiveView supports input debouncing and throttling to optimize form validation and submission. These features manage the frequency of server events, preventing excessive validation requests during rapid user input.

Why are my Phoenix LiveView forms not recovering state after a connection drop?

LiveView forms fail to recover state after a connection drop if the `phx-auto-recover` mechanism is not properly implemented. Utilizing Ecto changesets correctly ensures forms automatically restore user data mid-entry.