Skip to main content

Run form-based tasks

If your task has questionnaire format, you can build it out-of-the box with no custom code, by using our FormComposer task generator. All you need to do is to specify your JSON-based form configuration, and run a few commands.

  • Form layout is mobile-screen compatible; it's based on Bootstrap and displays content organized into form sections, fieldsets, fields, etc
  • Standard form behaviours include URL presigning (for data security), collapsible form sections, and fields validation
  • Optionally, you can customize form behaviour with JS code insertions to enable:
    • custom field validators (e.g. check text against a dictionary of forbidden words)
    • custom field triggers (e.g. toggle a form field based upon value provided in another field)

Run with docker

To launch a form-based Task from within a Docker container follow these steps:

  1. Prepare and validate your config files as described in FormComposer config files and FormComposer config utils sections

  2. Launch your form-based Task (see details in Running FormComposer task). For a lcal testing scenario, we will run:

docker-compose -f docker/ run \
--build \
--publish 8081:8000 \
--publish 3001:3000 \
--rm mephisto_dc \
mephisto form_composer

Access Task units

Once your Task launches, your console will display you URLs like this: http://<YOUR_DOMAIN>/?worker_id=x&assignment_id=1.

  • If you're doing local testing with local architect and mock provider, your URLs will start with http://localhost:3000/. To access your Task units as a worker, just paste one of these URLs into your browser.
    • If running with Docker, you will need to replace port 3000 in the console URLs with the remapped port (e.g. for 3001:3000 it will be 3001).
  • If you're running with a "real" provider, to access your Task units you will need to log into the provider's platform as a worker, and find them there.

Further Details

Learn more in our FormComposer guide: