So far we've only looked at one type of question - single text. Docassemble comes pre-loaded with many different question types that give you options on how to ask users for information, as well as how to present options to your users.
The example block is your friend
At the bottom of the Playground there's a segment called
This many examples of common structures and methods used in creating
Docassemble interviews, and is the best reference guide for starting out,
and even if you've been using Docassemble for a while.
Using multiple fields in the same question
What if we want to ask the user for multiple pieces of information using only a single question?
Restricting the user to a specific type of answer
What if we want the user to only answer with a number, a date, or an email address?
Creating true-false questions
yesno question type is an easy way to have users set a
variable to true or false:
Multiple choice questions
Docassemble gives you different ways to present multiple choice questions.
- Modify your Hello, World exercise so that it uses three different question types.
Sam Harden, June 2020