demo.mp4
This plug in simulates a coin flip with animation and stores the randomization result.
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 |
- Download the test form extras/sample-form from this repo and upload it to your SurveyCTO server.
- Attach head.png and tail.png files for head and tail images. Alternatively, download from here and upload with form.
- Download the coinflip.fieldplugin.zip file from this repo, and attach it to the test form on your SurveyCTO server.
- Make sure to provide the correct parameters (see below).
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)
Mehrab Ali
ARCED Foundation
Email: mehrab.ali@arced.foundation
-
Sample form
You can find a form definition in this repo here: extras/sample_form. -
Developer documentation
More instructions for developing and using field plug-ins can be found here: https://github.com/surveycto/Field-plug-in-resources -
User documentation How to get started using field plug-ins in your SurveyCTO form. (https://docs.surveycto.com/02-designing-forms/03-advanced-topics/06.using-field-plug-ins.html)