81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
make a selection drop down
~~~~~~~~~~~~~~~~~~~~~~~~~~
In view.scm:
(s:select '(("World" 0)("Country" 1)("State" 2 #t)("Town/City" 3)) 'name 'scope)
In control.scm:
(let ((scope (s:get-input 'scope))
(scope-num (s:get-input 'scope 'number))) ;; 'number, 'raw or 'escaped
....
The optional third entry sets that item as selected if true
Simple error reporting
~~~~~~~~~~~~~~~~~~~~~~
In control.scm:
(s:set-err "You must provide an email address")
|
>
|
>
>
|
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
make a selection drop down
~~~~~~~~~~~~~~~~~~~~~~~~~~
In view.scm:
;; Label Value visible-str selected
(s:select '(("World" 0)("Country" 1)("State" 2 "The state" #t )("Town/City" 3)) 'name 'scope)
Visible str will be shown if provided. Selected will set that entry to pre-selected.
In control.scm:
(let ((scope (s:get-input 'scope))
(scope-num (s:get-input 'scope 'number))) ;; 'number, 'raw or 'escaped
....
The optional fourth entry sets that item as selected if true
Simple error reporting
~~~~~~~~~~~~~~~~~~~~~~
In control.scm:
(s:set-err "You must provide an email address")
|