summaryrefslogtreecommitdiff
path: root/demo/form.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/form.ur')
-rw-r--r--demo/form.ur18
1 files changed, 18 insertions, 0 deletions
diff --git a/demo/form.ur b/demo/form.ur
new file mode 100644
index 00000000..ec466db3
--- /dev/null
+++ b/demo/form.ur
@@ -0,0 +1,18 @@
+fun handler r = return <xml><body>
+ <table>
+ <tr> <th>A:</th> <td>{[r.A]}</td> </tr>
+ <tr> <th>B:</th> <td>{[r.B]}</td> </tr>
+ <tr> <th>C:</th> <td>{[r.C]}</td> </tr>
+ </table>
+</body></xml>
+
+fun main () = return <xml><body>
+ <form>
+ <table>
+ <tr> <th>A:</th> <td><textbox{#A}/></td> </tr>
+ <tr> <th>B:</th> <td><textbox{#B}/></td> </tr>
+ <tr> <th>C:</th> <td><checkbox{#C}/></td> </tr>
+ <tr> <th/> <td><submit action={handler}/></td> </tr>
+ </table>
+ </form>
+</body></xml>