List of Question Types in CommCare

This section goes through some common question types to show how they will appear on the phone.

 

Screenshot 2024-04-24 at 8.27.51 PM.png

Question Types in CommCare

Text

Text questions will appear with an alphabetic keyboard by default.

Design Guidance: While helpful in certain cases, know that text inputs are the most time-consuming and error-prone type of question. Wherever possible replace text questions with single select questions. If there are a lot of options for a response, consider breaking it down into several shorter lists (i.e. first ask which village, then depending upon that answer ask which part of the village).

 

Multiple Choice

Multiple Choice

You simply select the desired option and the circle will show as filled.  If you hold you finger continuously on an option you will get a pop-up screen that says "Edit Prompt: Remove Response."  If, for example, you accidentally answered a question that you wanted to leave blank, you can remove your choice through the "remove response" tool.  It is also common for users to "accidentally" get the remove response message by holding their finger too long when selecting an option.

Design Guidance

  • Many applications have lots of yes/no questions. Keeping the order of these consistent makes it easier for the user to navigate through the forms more quickly. However, varying the position means that the user has to pay more attention to the actual answer.

  • If a single select question dictates what the next question will be (if yes show question A, if no show question B) it is best to make the single select question required.

Checkbox

In Multiple Choice questions you can select more than one option, which is usually indicated by square boxes. You can create useful constraint messages as well.

Design Guidance

Number

Integer

Numeric input questions will display a number pad.

  • Integer: a whole number

  • Values must be greater than 1 but smaller than 2,147,483,647.

  • Phone Number or Numeric ID: any identifiable telephone number including those beginning in zero (0)

  • Decimal: an un-whole number (Ex: 0.25)

Design Guidance

  • Make sure you choose carefully whether you want an integer or decimal number in you data and choose the question type accordingly.

  • Keep in mind that neither integer nor decimal questions keep leading zeros. If you need to maintain leading zeros choose Phone Number/Numeric ID Question Type

  • If you need to have a number of a specific length (i.e. for an ID number), put a string-length constraint on the question → see Common Logic and Calculations.

Date and Time

You can ask for a date, time, or a combination of date and time. You can use the up/down arrows to adjust the values. For more info on date collected, please see: Understanding Times and Dates.

Date

  • Date: collects a date inputted by the user
    Note: On an Android device, the format of a date is determined by the language settings for the device. On WebApps, the accepted input formats are as follows (in order of preference, and note the delimiter matters as part of the format):

    • 'MM/DD/YYYY'

    • 'YYYY-MM-DD'

    • 'M/D/YYYY'

    • 'M/D/YY'

    • 'M-D-YYYY'

    • 'M-D-YY'

    • ISO8601 format

    • If you enter a date with a two digit year, the widget uses logic to figure out which year: currentYear - 90 <=  *inputYear* <= currentYear + 10

  • Read more here: Date and Calendar Display.

Time

  • Collects a time input from the user based on device time zone settings
    If device time zone settings are unavailable, time is collected in UTC (Coordinated Universal Time).

  • Time values are always shown in a 24 hour clock.

  • Date and Time: collects both date and time

Groups

Groups

A container for questions. Questions within a group are displayed in the question tree under the group heading.

Repeat Groups

A container for questions relating to a named element (Ex: Child)

Read more here: Repeat Groups.

Question list

List of questions that will be grouped onscreen in a form
Note: Applicable only to ODK code and Android devices. A question list does not require a label or display text.

Multimedia

For instructions on how to use and install multimedia in CommCare see Multimedia in CommCare.

When you add an audio or video file you can play it by selecting the button in the upper right-hand corner. Clicking on the button will start playing the file, and you can press it again to pause the playback.

Image, Audio, Video

CommCare for Android can be used to take capture or upload images, audio, or video to a form.

  • Image Capture: Images are stored in JPEG format.

  • Audio Capture: Applies to Android devices that support 3GA file types. Consider downloading an audio recorder if needed such as RecForge Lite.RecForge Lite Audio Recorder.

  • Video Capture: Captures a video recording. Applies to Android devices only.

CommCare cannot accept large image files. Anything greater than 1MB could cause issues including slow syncing and failure to upload the picture to CCHQ. The best rule of thumb is to use a small (< 1MB) file size when taking pictures within CC.  VGA files seem to work particularly well.  You may have to manually adjust this in your camera app if you prefer to take larger size pictures outside of CommCare. If you are looking at a report in CCHQ and you either can't find an image you know you captured, or you see an image file name but it is not linked to anything, make sure that you did not take a very large image that could not be submitted over the network.

When you get to a screen with a media capture question you will have the option of either capturing the data in real time (i.e. opening a camera app to take a picture) or choosing a file from you phone (i.e. navigating to a folder on your device to find a specific file).

Other Notes

Signature Capture

The Signature Catpure question type can be used to capture a client's signature and send it to the CommCare HQ server. It can then be accessed as an image file (saved as PNG) in the form submission report from the attachments tab. Clicking on Gather Signature will open a screen where you can write a signature with your finger or a stylus. Then choose Save and Close to capture the signature. You can replace it by clicking on Gather Signature again.

Labels

Labels are used to display messages. The message can be changed or translated through the Translate the CommCare User Interface.

Hidden Value

Used for calculations and referencing data points from other forms, modules, or applications within a project. See here for more info: Calculations in Hidden Values.

Lookup Tables

Read more here: Lookup Tables.

Advanced Questions

GPS Question

When you reach a GPS question, the user will be presented with a "Record Location" button.  Upon selecting the button, a loading screen will indicate the accuracy of the GPS coordinates.  A spinning circle icon will be displayed while the devices searches for the location, and is replaced by a green check mark when the location is locked in. When accuracy gets to 5 m the coordinates will automatically be captured and displayed on the screen.  If you do not need such high accuracy, you can record the location earlier.  Once the location is displayed in your form, you simply swipe to go on to the next screen.  Selecting "Record Location" again will re-initiate the GPS capture process and can overwrite the first set of coordinates.

The first time you try to do a GPS capture in a new location it can take a long time to find the location, sometimes as much as 10 minutes. Subsequent captures will likely be much faster.

Read more here: Geospatial Features - GPS, Maps, and Distances.

Design Guidance

  • If you are going to add a GPS question make sure that GPS works well on your phone in the areas you will be working. Don't make GPS questions required unless you're sure you can get them every time.  

  • Consider what the user should do if they can’t get a GPS reading while they are in the field. This could include a follow up question that is displayed if the GPS question is left blank, and asks the reason.  

Barcode Scan

The barcode question will open the phone’s camera and capture the data stored in an external barcode. Answers to barcode scanner questions can also be saved as case properties and used to search and identify cases later, in the case list.

Password

User inputted text with characters displayed as an asterisk (*)

Android App Call Out

In CommCare you can call out to a different Android application to get an input. Instructions are at Android Application Integrations.

Special Formatting and Tools

This section describes formatting and question types that are specific to CommCare for Android

Required Question

Required questions prevent the user from moving forward in the form without entering or selecting a value. Be careful when specifying a question is required - if the user of the application cannot determine the value for a particular question (ex. they are transcribing from a paper form and the particular value is not filled in), this can prevent them from submitting any data. If necessary, you can add a follow-up question that asks why a particular value was blank.

Generating a QR code in your form

In the place of an image, a question can be configured to display a QR code which contains text that is dynamically set in the form.

To configure a question to display a QR code in the Form Builder, find Add Other under the question's Content header, and click "custom". When prompted for a content type, enter qrcode, then enter the text you want to be encoded in the QR code into the new label.

If you want the code to contain data from the form (like a case ID or a computed value), you can use advanced <output> features as outlined in the Hidden Value Calculations Tutorial. You can test the content by displaying it first in a question's normal label if needed.

This feature is only available in CommCare 2.8 or higher.

Hint Text

In CommCare you can use "hint text" which will appear in a smaller font underneath your display text. To add hint text in the app builder, open the "Advanced Properties" tab and put your text in the "hint" field.

Question List

You can group questions on one screen by putting all of the relevant questions in a "Question List" group. This group type is available in the https://dimagi.atlassian.net/wiki/x/PDHKfw under the Group set of question types. Note that you cannot run a calculation within a screen (i.e. you cannot have the outcome of a question at the top of a screen affect the display condition of one on the bottom of the same screen).

Changing Font in Android

You can adjust the font by pushing the settings button while inside any form. Once you change the font size one time from within any form, CommCare will remember the new font size and display it in all other forms. You can make the menu text larger by changing your phone's font settings (Settings -> Display -> Font Size)

See here for more details as well: Advanced CommCare Android Formatting.

Case List and Details

In CommCare case list view it is important not to put too much text or data in the case list as this will make it very difficult to navigate through the case list.  Below you can see examples of a case list (left) and case details (right).  More information at: https://dimagi.atlassian.net/wiki/spaces/commcarepublic/pages/2143947182.