On this page:
refresh-every
~$
~euro
~pound
diceroll-js
questions
slider-js
timer
assigning-treatments
is-equal
make-multiple-checkboxes
make-sliders
toggleable-xexpr
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"

procedure

(diceroll-js arg)  any/c

  arg : any/c
diceroll-js proc

procedure

(questions arg)  any/c

  arg : any/c
questions proc

procedure

(slider-js arg)  any/c

  arg : any/c
slider-js proc

procedure

(timer arg)  any/c

  arg : any/c
timer proc

syntax

(assigning-treatments arg)

 
  arg : any/c
assigning-treatments form — probably deprecated (related to matchmaking)

syntax

(is-equal arg)

 
  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

(toggleable-xexpr arg)

 
  arg : any/c
toggleable-xexpr form