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
151
151
attr :type , :string ,
152
152
default: "text" ,
153
153
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 )
155
155
156
156
attr :field , Phoenix.HTML.FormField ,
157
157
doc: "a form field struct retrieved from the form, for example: @form[:email]"
@@ -179,6 +179,12 @@ defmodule <%= @web_namespace %>.CoreComponents do
179
179
|> input ( )
180
180
end
181
181
182
+ def input( % { type: "hidden" } = assigns ) do
183
+ ~H"""
184
+ < input type = "hidden " id = { @ id } name = { @ name } value = { @ value } { @ rest } />
185
+ """
186
+ end
187
+
182
188
def input( % { type: "checkbox"} = assigns ) do
183
189
assigns =
184
190
assign_new( assigns, :checked , fn ->
You can’t perform that action at this time.
0 commit comments