buildxforms: training_form_5.xml

File training_form_5.xml, 1.8 KB (added by droos, 17 months ago)
Line 
1<h:html xmlns="http://www.w3.org/2002/xforms"
2        xmlns:h="http://www.w3.org/1999/xhtml"
3        xmlns:ev="http://www.w3.org/2001/xml-events"
4        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
5        xmlns:jr="http://openrosa.org/javarosa">
6        <h:head>
7                <h:title>Demo Form</h:title>
8
9                <model>
10                        <instance>
11                                <!-- the XML inside here is what gets filled out and submitted when you complete the form -->
12                                <student>
13                                        <form_version>0.0.2</form_version>
14                                        <name />
15                                        <city>DAR ES SALAAM</city>
16                                        <sex />
17                                        <age />
18                                        <grad_date />
19                                        <interests />
20                                </student>
21                        </instance>
22
23                        <!-- binds allow us to add properties to the questions, like data types, skip logic, etc.-->
24                        <bind nodeset="age" type="int" />
25                        <bind nodeset="grad_date" type="date" />
26                </model>
27        </h:head>
28
29        <h:body>
30                <!-- This is where we define the questions that the user will fill out -->
31                <input ref="name">
32                        <label>What is your name?</label>
33                </input>
34
35                <input ref="city">
36                        <label>What city do you live in?</label>
37                </input>
38               
39                <select1 ref="sex">
40                        <label>Are you male or female?</label>
41                        <item>
42                                <label>Male</label>
43                                <value>m</value>
44                        </item>
45                        <item>
46                                <label>Female</label>
47                                <value>f</value>
48                        </item>
49                </select1>
50               
51                <input ref="age">
52                        <label>How old are you?</label>
53                </input>
54
55                <input ref="grad_date">
56                        <label>When will you graduate?</label>
57                </input>
58               
59                <select ref="interests">
60                        <label>What are your interests?</label>
61
62                        <item>
63                                <label>Eating Ugali</label>
64                                <value>ugali</value>
65                        </item>
66                        <item>
67                                <label>Watching TV</label>
68                                <value>tv</value>
69                        </item>
70                        <item>
71                                <label>Music</label>
72                                <value>music</value>
73                        </item>
74                        <item>
75                                <label>Making XForms</label>
76                                <value>xforms</value>
77                        </item>
78                </select>
79
80        </h:body>
81</h:html>