6.1.3 Survey Tools
(require conscript/survey-tools) | package: conscript |
The bindings in this module are also provided by conscript/base.
procedure
(refresh-every n-seconds) → xexpr?
n-seconds : exact-positive-integer?
Returns a representation of an HTML <script> element that causes the browser to
reload the current page every n-seconds.
procedure
(~$ n) → string?
n : rational?
procedure
(~euro n) → string?
n : rational?
procedure
(~pound n) → string?
n : rational?
Returns a string representing n to two decimal places and prefixed with a currency symbol.
⏳Should include a way to use something other than ‘.‘ for the decimal separator
Examples:
> (define price 1.045) > (~$ price) "$1.04"
> (~euro price) "€1.04"
> (~pound price) "£1.04"
⏳diceroll-js proc
⏳questions proc
⏳slider-js proc
⏳timer proc
syntax
arg : any/c
⏳assigning-treatments form — probably deprecated (related to matchmaking)
syntax
arg : any/c
⏳is-equal form
procedure
(make-multiple-checkboxes options [ #:n num-required] #:message message) → formular-field? options : (listof (cons/c symbol? string?)) num-required : exact-nonnegative-integer? = 0 message : (or/c #f string?)
See How to have a form input with multiple checkboxes for more examples of this function in use.
Returns a field containing multiple checkboxes defined by the options list. The num-required argument specifies the minimum number of checkboxes the user must check before they can submit the form. If message is not #f, it will be shown to the participant if they don’t check at least num-required boxes.
syntax
(make-sliders arg)
arg : any/c
make-sliders form
syntax
arg : any/c
toggleable-xexpr form