General StuffForm action stuff add StuffForm method post StuffForm att

 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
; General
StuffForm.action = "/stuff/add"
StuffForm.method = "post"
StuffForm.attribs.id = "addStuff"
StuffForm.attribs.enctype = "application/x-www-form-urlencoded"
;attribs.onSubmit = "if(StuffFormValidate(this) == false) { return false; }else { form.submit(); }"
; Item Name
StuffForm.elements.name.type = "text"
StuffForm.elements.name.options.validators.strlen.validator = "StringLength"
StuffForm.elements.name.options.validators.strlen.options.min = "2"
StuffForm.elements.name.options.validators.strlen.options.max = "99"
StuffForm.elements.name.options.filters.striptags.filter = "StripTags"
StuffForm.elements.name.options.required = true
StuffForm.elements.name.options.label = "Item Name"
; List
StuffForm.elements.list.type = "multiselect"
StuffForm.elements.list.options.label = "List"
StuffForm.elements.list.options.required = true
StuffForm.elements.list.options.multiple = true
; Description
StuffForm.elements.description.type = "text"
StuffForm.elements.description.options.filters.striptags.filter = "StripTags"
StuffForm.elements.description.options.required = true
StuffForm.elements.description.options.label = "Description"
; Location
StuffForm.elements.location.type = "text"
StuffForm.elements.location.options.label = "Location/Store"
StuffForm.elements.location.options.validators.strlen.validator = "StringLength"
StuffForm.elements.location.options.validators.strlen.options.min = "2"
StuffForm.elements.location.options.validators.strlen.options.max = "255"
; Price
StuffForm.elements.price.type = "text"
StuffForm.elements.price.options.label = "Price"
StuffForm.elements.price.options.validators.strlen.validator = "StringLength"
StuffForm.elements.price.options.validators.strlen.options.min = "1"
StuffForm.elements.price.options.validators.strlen.options.max = "20"
; Currency
StuffForm.elements.currency.type = "text"
StuffForm.elements.currency.options.label = "Currency"
StuffForm.elements.currency.options.validators.strlen.validator = "StringLength"
StuffForm.elements.currency.options.validators.strlen.options.min = "1"
StuffForm.elements.currency.options.validators.strlen.options.max = "10"
; Qty
StuffForm.elements.qty.type = "text"
StuffForm.elements.qty.options.label = "Qty"
StuffForm.elements.qty.options.validators.int.validator = "Int"
; Tags
StuffForm.elements.tags.type = "text"
StuffForm.elements.tags.options.label = "Tags"
StuffForm.elements.tags.options.validators.strlen.validator = "StringLength"
StuffForm.elements.tags.options.validators.strlen.options.min = "1"
StuffForm.elements.tags.options.validators.strlen.options.max = "255"
; Note
StuffForm.elements.note.type = "text"
StuffForm.elements.note.options.label = "Note"
StuffForm.elements.note.options.validators.strlen.validator = "StringLength"
StuffForm.elements.note.options.validators.strlen.options.min = "1"
StuffForm.elements.note.options.validators.strlen.options.max = "1024"
; Rating
StuffForm.elements.rate.type = "text"
StuffForm.elements.rate.options.label = "Rating"
StuffForm.elements.rate.options.validators.int.validator = "int"
; Image
StuffForm.elements.file.type = "hidden"
StuffForm.elements.file.options.label = "Image"
; Item ID - for edit mode
StuffForm.elements.itemID.type = "hidden"