<div> <h2><%= @title %></h2> <.form let={f} for={@changeset} id="layout-form" phx-target={@myself} phx-change="validate" phx-submit="save"> <%= label f, :name %> <%= text_input f, :name %> <%= error_tag f, :name %> <%= label f, :version %> <%= number_input f, :version %> <%= error_tag f, :version %> <div> <%= submit "Save", phx_disable_with: "Saving..." %> </div> </.form> </div>