diff --git a/installer/templates/phx_web/components/core_components.ex b/installer/templates/phx_web/components/core_components.ex index 36a8df1aa5..d0206a9c2f 100644 --- a/installer/templates/phx_web/components/core_components.ex +++ b/installer/templates/phx_web/components/core_components.ex @@ -151,7 +151,7 @@ defmodule <%= @web_namespace %>.CoreComponents do attr :type, :string, default: "text", values: ~w(checkbox color date datetime-local email file month number password - search select tel text textarea time url week) + search select tel text textarea time url week hidden) attr :field, Phoenix.HTML.FormField, doc: "a form field struct retrieved from the form, for example: @form[:email]" @@ -179,6 +179,12 @@ defmodule <%= @web_namespace %>.CoreComponents do |> input() end + def input(%{type: "hidden"} = assigns) do + ~H""" + + """ + end + def input(%{type: "checkbox"} = assigns) do assigns = assign_new(assigns, :checked, fn ->