diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2017-07-23 09:50:04 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2017-07-23 09:50:04 -0400 |
commit | 0cccdb0ae595cd7e3e136e984ac7b95b99f71a53 (patch) | |
tree | 491d3b13813610943c60460d3e178d3a73916346 /demo/form.ur |
Import urweb_20170720+dfsg.orig.tar.gz
[dgit import orig urweb_20170720+dfsg.orig.tar.gz]
Diffstat (limited to 'demo/form.ur')
-rw-r--r-- | demo/form.ur | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/demo/form.ur b/demo/form.ur new file mode 100644 index 0000000..ec466db --- /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> |