PhoenixKit 1.7.216: Forms keep what you typed after a reconnect
PhoenixKit 1.7.216 lets LiveView restore what a user has typed into PhoenixKit forms after a dropped connection or a page crash.
LiveView only restores a form that has an id. 26 forms in core, storage, sitemap and maintenance had none, among them the media browser search, the media selector upload and the QR sign-in form, so a reconnect emptied them. Apps’ own test suites also showed a “missing id” warning coming from PhoenixKit’s templates. Every one of these forms now has a unique id, also when a page shows the same component more than once.
No visible change otherwise. Developers can pass an id to <.sort_selector> when a page has two of them for the same event.
Full release notes: PhoenixKit 1.7.216
1.7.216 · 27 July 2026
Fixed
- Every
phx-changeform now carries anid— LiveView cannot perform form recovery on an id-less form, so a crash or reconnect silently dropped whatever the user had typed, and host test suites saw an unfixableDetected a form with phx-change but missing idwarning coming out of the dep’s own templates (the only workaround beingconfig :phoenix_live_view, :test_warnings, missing_form_id: :ignore, which also mutes the host’s own genuine cases). 26 forms across core, storage, sitemap and maintenance were affected. Ids on LiveComponent-rendered forms are derived from the component’s@id(and, for per-row inline folder rename / description editors, the folder uuid) so nothing collides when a page renders more than one.<.form for={%{}}>call sites were affected too — a bare map with no:asproduces anilid — soMediaBrowser’s search, the annotation composer, the media selector upload form and the storage media-config form are fixed as well.
Changed
<.sort_selector>accepts anid— defaults to"pk-sort-selector-#{event}"; pass an explicit one when a page renders two sort selectors that share anevent.
PhoenixKit 1.7.216. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.