6.1.4 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.
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:
procedure
(diceroll-js arg) → any/c
arg : any/c
⏳diceroll-js proc
⏳questions proc
⏳slider-js proc
⏳timer proc
syntax
(assigning-treatments arg)
arg : any/c
⏳assigning-treatments form — probably deprecated (related to matchmaking)
⏳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
(toggleable-xexpr arg)
arg : any/c
toggleable-xexpr form