stch.html.form documentation
Generate HTML form elements.
->checkbox
(->checkbox name values)
(->checkbox name values checked)
Inputs: [name :- Named, values :- ValueDisplayPairs] [name :- Named, values :- ValueDisplayPairs, checked :- (Option String)]
Returns: InputLabelPairs
Returns HTML checkbox elements given an element
name, a sequence of value/display pairs, an optional
map of attributes (e.g., name, class), and an optional
checked value.
->options
(->options options)
(->options options selected)
Inputs: [options :- ValueDisplayPairs] [options :- ValueDisplayPairs, selected :- (Option String)]
Returns: [Element]
Converts a sequence of value/display pairs to option
elements. Optionally, provide the selected option.
->radio
(->radio name values)
(->radio name values checked)
Inputs: [name :- Named, values :- ValueDisplayPairs] [name :- Named, values :- ValueDisplayPairs, checked :- (Option String)]
Returns: InputLabelPairs
Returns HTML radio elements given an element
name, a sequence of value/display pairs, an optional
map of attributes (e.g., name, class), and an optional
checked value.
->select
(->select name options)
(->select name options selected)
Inputs: [name :- Named, options :- ValueDisplayPairs] [name :- Named, options :- ValueDisplayPairs, selected :- (Option String)]
Returns: Element
Returns an HTML select element given an element
name, a sequence of value/display pairs, an optional map
of attributes (e.g., name, class), and an optional selected
value.
capture-audio
(capture-audio n)
Inputs: [n :- String]
Returns: Element
capture-image
(capture-image n)
Inputs: [n :- String]
Returns: Element
capture-video
(capture-video n)
Inputs: [n :- String]
Returns: Element