Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page outlines recommendations for designing and building useful CommCare applications. These are compiled from collective experience in app construction and are only recommendations. Individual projects could vary substantially and the overall best practice is to go through extensive user testing and piloting to identify and correct language, media, or work flows that are confusing.

...

  • Take advantage of calculations in forms to minimize errors. For example, if you are asking for a birth date, add a label afterwards that shows the calculated age. This may highlight an error in date entry if the age appears different than what the user expected.

  • Use labels to force the user to stop and verify their information. You can add a label that shows the user data they entered and encourages them to verify if it is correct (see Common Logic and Calculations ).

  • Use groups to prevent writing the same display logic (and having to update it) for related questions. Groups also make it easier to manage large forms in the designer (see the Beginner's Guide)
  • Consider including a success/you're done with the form label as your last question. This can be particularly useful on J2ME phones by giving the user an opportunity to correct any errors and make it clear to the user that the form is ending..
  • Don't try to do too much in one form. If you make a simple form that is easy to use it has a higher probabilty of success than a complex one that tries to tackle too much.

...

Keep in mind that neither integer nor decimal questions keep leading zeros. If you need to maintain leading zeros choose text input (see Common Logic and Calculations). By editing the xml you can make the number keyboard show on the screen, instead of the alphabetic keyboard.  You need to find the question in the "Edit Source XML" box and add appearance = "numeric" as below:

 

<input ref="/data/phone_number" appearance="numeric">
                <label ref="jr:itext('phone_number-label2')" />
</input>

In the near future there will be a new "phone number" question type that will allow you to store long integers, but until then, if you want to store a number greater than 8 digits, you should choose "text" input. By editing the xml you can make the number keyboard show on the screen, instead of the alphabetic keyboard, as above.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)

...