summaryrefslogtreecommitdiff
path: root/tests/subforms.ur
blob: 3db55a430faf4f2405bc0dd8e9c3d6ffffe2f43e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fun handler' ls =
    case ls of
        Nil => <xml/>
      | Cons (r, ls) => <xml><li>{[r.A]}, {[r.B]}, {[r.Sub]}</li>{handler' ls}</xml>

fun handler r = return <xml><body>
  {[r.A]}, {handler' r.Sub}, {[r.C]}
</body></xml>

fun main () = return <xml><body>
  <form>
    <textbox{#A}/><br/>
    <subforms{#Sub}>
      <entry>
        <textbox{#A}/><br/>
        <textbox{#B}/><br/>
        <textbox{#Sub}/><br/>
      </entry>
    </subforms>
    <textbox{#C}/><br/>
    <submit action={handler}/>
  </form>
</body></xml>