Skip to content
Browse files

add name to input and a helper for hidden inputs

  • Loading branch information...
1 parent 660afea commit 5fa99d907743fac87a015623e78e354db58a7d83 @daaku committed May 14, 2012
Showing with 16 additions and 0 deletions.
  1. +15 −0 helper_hidden_inputs.go
  2. +1 −0 tag_input.go
View
15 helper_hidden_inputs.go
@@ -0,0 +1,15 @@
+package h
+
+import (
+ "net/url"
+)
+
+func HiddenInputs(values url.Values) HTML {
+ frag := &Frag{}
+ for key, list := range values {
+ for _, each := range list {
+ frag.Append(&Input{Name: key, Value: each})
+ }
+ }
+ return &Div{Style: "display:none", Inner: frag}
+}
View
1 tag_input.go
@@ -3,6 +3,7 @@ package h
type Input struct {
ID string `h:"attr"`
Class string `h:"attr"`
+ Name string `h:"attr"`
Style string `h:"attr"`
Type string `h:"attr"`
Value string `h:"attr"`

0 comments on commit 5fa99d9

Please sign in to comment.
Something went wrong with that request. Please try again.