summaryrefslogtreecommitdiff
path: root/swat.obsolete/esptest/formtest.esp
blob: 23108498954b0f03ff46a866ad1290d3925f5374 (plain)
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
<% page_header("columns", "ESP Form Test", "esptest"); 
   include("/scripting/forms.js");
%>

<%
var f = FormObj("FormTest", 3, 2);
f.element[0].label = "First Name";
f.element[0].name  = "firstName";
f.element[0].value = form['firstName'];
f.element[1].label = "Last Name";
f.element[1].name  = "lastName";
f.element[1].value = form['lastName'];
f.element[2].label = "Color";
f.element[2].type  = "select";
f.element[2].list  = new Array("Red", "Green", "Blue", "Yellow");
f.element[2].value = form['Color'];
f.submit[0] = "OK";
f.submit[1] = "Cancel";

f.display();

<%
  /* if its a post then the user has filled in the form, so
     report the values 
  */
  if (form['submit'] == "OK") {
%>
  You chose firstName=@@form['firstName'] lastName=@@form['lastName']<p>
  
<%
   simple_table(form);
  }
%>

<% page_footer(); %>