forked from erlyaws/yaws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform.yaws
63 lines (40 loc) · 1.44 KB
/
form.yaws
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<erl>
out(A) ->
{ssi, "TAB.inc", "%%",[{"form", "choosen"}]}.
</erl>
<div id="entry">
<h2>POST example </h2>
<p>This is a simple example where we get to fill in
a series of fields and POST the data by hitting the Submit button
at the end.
</p>
<p>
The action is set to the yaws file <tt>/post.yaws </tt> which
gets POSTed data in its <tt>ARG#arg.clidata</tt> field.
</p>
<form method="post"
action="/post.yaws">
This is a serious poll.
<p>Your favourite programming language? </p>
<input name="lang" type="text" size="48" />
<p>Imperative ? <input name="imperative" type="checkbox"/></p>
<p>How many tabs to you indent? <input name="tabs" type="text" /></p>
<p>Which OS do you use?</p>
<ol>
<li>Windows 95 pro ultra
<input name="os1" type="checkbox" value="w95"/></li>
<li>Windows XP beta cracked
<input name="os2" type="checkbox" value="xpbeta" /></li>
<li>Windows
<input name="os3" type="checkbox" value="windows"/></li>
<li>Other<input name="other" size="40" /></li>
</ol>
<p>Your email <input name="contact" size="42" /></p>
<p>Submit this POST to get an explanation of how to process the
POSTed data.</p>
<p><input type="submit" /> <input type="reset" /></p>
</form>
</div>
<erl>
out(A) -> {ssi, "END2",[],[]}.
</erl>