Example: (in custform.per)
This example shows how to define a combobox in a text-based form specification file (custform.per).
Form
custform.per:
...
18
LAYOUT
(TEXT
="Customer")
19
GRID
20
{
21
Store #:[f01 ] Name:[f02 ]
22
Address:[f03 ]
23
[f04 ]
24
City:[f05 ]State:[f6 ]Zip:[f07 ]
25
Contact:[f08 ]
26
Phone:[f09 ]
27
}
28
END
29
END
30
TABLES
31
customer
32
END
33
ATTRIBUTES
34
EDIT
f01=customer.store_num,
35
REQUIRED
, COMMENT
="This is the co-op store number";
36
EDIT
f02=customer.store_name;
37
EDIT
f03=customer.addr;
38
EDIT
f04=customer.addr2;
39
EDIT
f05=customer.city;
40
COMBOBOX
f6=customer.state,
41
REQUIRED
, ITEMS
= ("IL", "IA", "WI");
41
EDIT
f07=customer.zip_code;
42
EDIT
f08=customer.contact_name;
43
EDIT
f09=customer.phone;
43
END
Note:
- Line
18
, the title of the window is set toCustomer
. Since this is a normal application window, the default window style is used. - Line
40
, aCOMBOBOX
is substituted for a simpleEDIT
form field. - Line
35
and41
TheREQUIRED
attribute forces the user to enter or select a value for this field when a new record is being added. See the attributes list for a complete list of the attributes that can be defined for a form field.