Cannot use a live_component inside of a form_for

I found a solution. You should not use form_for/4 when working with liveview.
You should use the form component instead.

<.form let={f} for={@changeset} phx-change={:validate} phx-submit={:save} phx-target={@myself}></.form>

3 Likes