diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-30 14:48:23 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-30 14:48:23 -0400 |
commit | 72414e8531db237906a847fe1a7adaed4b000978 (patch) | |
tree | 1d0c5addd790f3060e6c49aa54e931f2791a3bb7 | |
parent | 62eac5c0efc2d57f70a744de705a1e38923570bc (diff) |
<input type='hidden'>
-rw-r--r-- | lib/ur/basis.urs | 1 | ||||
-rw-r--r-- | src/monoize.sml | 1 | ||||
-rw-r--r-- | tests/subforms.ur | 4 |
3 files changed, 5 insertions, 1 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs index b59ab26a..e5175a08 100644 --- a/lib/ur/basis.urs +++ b/lib/ur/basis.urs @@ -584,6 +584,7 @@ con formTag = fn (ty :: Type) (inner :: {Unit}) (attrs :: {Type}) => -> [[Form] ~ ctx] => nm :: Name -> unit -> tag attrs ([Form] ++ ctx) inner [] [nm = ty] +val hidden : formTag string [] [Value = string] val textbox : formTag string [] [Value = string, Size = int, Source = source string] val password : formTag string [] [Value = string, Size = int] val textarea : formTag string [] [Rows = int, Cols = int] diff --git a/src/monoize.sml b/src/monoize.sml index e754452d..c54ab8ba 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -2533,6 +2533,7 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | "submit" => normal ("input type=\"submit\"", NONE, NONE) | "button" => normal ("input type=\"submit\"", NONE, NONE) + | "hidden" => input "hidden" | "textbox" => (case targs of diff --git a/tests/subforms.ur b/tests/subforms.ur index cf5d0ba4..f6876bd8 100644 --- a/tests/subforms.ur +++ b/tests/subforms.ur @@ -1,7 +1,7 @@ fun handler' ls = case ls of Nil => <xml/> - | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml> + | Cons (r, ls) => <xml><li>{[r.Nam]}, {[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml> fun handler r = return <xml><body> {[r.A]}<br/> @@ -14,12 +14,14 @@ fun main () = return <xml><body> <textbox{#A}/><br/> <subforms{#Sub}> <entry> + <hidden{#Nam} value="Sparky"/> <textbox{#A}/><br/> <textbox{#B}/><br/> <textbox{#Sub}/><br/> </entry> <entry> + <hidden{#Nam} value="Snarky"/> <textbox{#A}/><br/> <textbox{#B}/><br/> <textbox{#Sub}/><br/> |