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:
Prepare and validate your config files as described in FormComposer config files and form_composer config command sections
Launch your form-based Task (see details in Running FormComposer task). For a local testing scenario, we will run:
docker-compose -f docker/docker-compose.dev.yml 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 andmock
provider, your URLs will start withhttp://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. for3001:3000
it will be3001
).
- If running with Docker, you will need to replace port
- 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: