Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.45 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.45 KB

Coin flip

demo.mp4

Description

This plug in simulates a coin flip with animation and stores the randomization result.

Download now

Default SurveyCTO feature support

Feature / Property Support
Supported field type(s) text
Default values No
media:image Yes
media:audio Yes
media:video Yes
Custom required message Yes
Read only No

How to use

  1. Download the test form extras/sample-form from this repo and upload it to your SurveyCTO server.
  2. Attach head.png and tail.png files for head and tail images. Alternatively, download from here and upload with form.
  3. Download the coinflip.fieldplugin.zip file from this repo, and attach it to the test form on your SurveyCTO server.
  4. Make sure to provide the correct parameters (see below).

Parameters

Key Value
head Text to show and store when its head
tail Text to show and store when its tail
random (Optional) Random number [Ideally generated in SurveyCTO calculate function once(random())]
head_p (Optional) Proability of head (default is .5)

Example:
custom-flipcoin(head="Air Filter", tail="No Air Filter", head_p=.5)

Author

Mehrab Ali
ARCED Foundation
Email: mehrab.ali@arced.foundation

More resources