changeset 761:16b34dc2e29c

<input type='hidden'>
author Adam Chlipala <adamc@hcoop.net>
date Thu, 30 Apr 2009 14:48:23 -0400
parents 21f6d2e65685
children 9021d44ba6b2
files lib/ur/basis.urs src/monoize.sml tests/subforms.ur
diffstat 3 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lib/ur/basis.urs	Thu Apr 30 14:43:55 2009 -0400
+++ b/lib/ur/basis.urs	Thu Apr 30 14:48:23 2009 -0400
@@ -584,6 +584,7 @@
                   -> [[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]
--- a/src/monoize.sml	Thu Apr 30 14:43:55 2009 -0400
+++ b/src/monoize.sml	Thu Apr 30 14:48:23 2009 -0400
@@ -2533,6 +2533,7 @@
                     
                   | "submit" => normal ("input type=\"submit\"", NONE, NONE)
                   | "button" => normal ("input type=\"submit\"", NONE, NONE)
+                  | "hidden" => input "hidden"
 
                   | "textbox" =>
                     (case targs of
--- a/tests/subforms.ur	Thu Apr 30 14:43:55 2009 -0400
+++ b/tests/subforms.ur	Thu Apr 30 14:48:23 2009 -0400
@@ -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 @@
     <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/>