File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
installer/templates/phx_web/components Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
151151 attr :type , :string ,
152152 default: "text" ,
153153 values: ~w( checkbox color date datetime-local email file month number password
154- search select tel text textarea time url week)
154+ search select tel text textarea time url week hidden )
155155
156156 attr :field , Phoenix.HTML.FormField ,
157157 doc: "a form field struct retrieved from the form, for example: @form[:email]"
@@ -179,6 +179,12 @@ defmodule <%= @web_namespace %>.CoreComponents do
179179 |> input ( )
180180 end
181181
182+ def input( % { type: "hidden" } = assigns ) do
183+ ~H"""
184+ < input type = "hidden " id = { @ id } name = { @ name } value = { @ value } { @ rest } />
185+ """
186+ end
187+
182188 def input( % { type: "checkbox"} = assigns ) do
183189 assigns =
184190 assign_new( assigns, :checked , fn ->
You can’t perform that action at this time.
0 commit comments