Resources

JSON Form Definition



On this page, the reader is walked through the steps required to design the City Census form introduced in the previous page. The form consists of 7 input screens with a number of constraints. These screens and their constraints are presented below:

  1. Continent input screen: This screen allows a data collector to select one continent from the 8 options available. This is a Single choice input type.

  2. Country input screen: This displays a list of countries depending on the continent selected in the Continent input screen to the data collector. This is a Cascade input type.

  3. City input screen: This is a screen that prompts the data collector to type in the city name. It is of Text input type.

  4. Population 1950: This input screen prompts the data collector for an integer value. value entered into this screen cannot be less than zero. This screen is an Integer input type.

  5. Population 2000: This input screen prompts the data collector for an integer value. value entered into this screen cannot be less than zero. This screen is an Integer input type.

  6. Population 2050: This input screen prompts the data collector for an integer value. value entered into this screen cannot be less than zero. This screen is an Integer input type.

  7. City Location: This screen prompts the data collector to get the GPS location of any part of the City. This input screen is defined such that it only accepts GPS readings the have an accuracy of 5 meters or less. This screen is a Location input type.

See here for the many input screen types available.

It is pertinent to state here that the Continents-Countries.xlsx contained in the zip folder downloaded for this example is required for this exercise. This .xlsx file has two sheets named: continents and countries-by-continents. The continents sheet has the list of continent names to be used as options for the Continent input screen. The countries-by-continents sheet, on the other hand, contains a list of countries arranged according to their continent. It is important the reader observes how this data is arranged in the Excel file sheets.

Note that the CCA Desktop app is required for this exercise.



Slide 1


image


(1) Start the CCA Desktop app.

(2) Click the New Form menu on the left hand side of the screen.

(3) Type "City Census" into the form name prompt as shown in the image above.

(4) Type "This form captures the population of cities in 1950, 2000 and projected population in 2050" into the form description prompt as shown in the image above.

(5) Leave the Enable Partial Save box checked. Checking this box allows partially filled forms to be saved and completed at a later time during data collection.

(6) Continue on the next slide.

Slide 2


image


(1) Select Single Choice in the Select Screen Type dropdown box.

(2) Type in "Continent" in the Screen ID prompt textbox.

(3) Leave the Input Required box checked.

(4) Continue on the next slide.

Slide 3


image


(1) Click the Add Screen Label button.

(2) Choose English in the Select Language dropdown box shown.

(3) Enter "1. What continent is this city located in?" into the screen label prompt as shown in the image above.

(4) Enter "Select only one" into the screen hint prompt as shown in the image above.

(5) Click the Save button.

(6) Change the selection in the Select Language dropdown box choose French.

(7) Enter "1. Dans quel continent se trouve cette ville?" into the screen label prompt.

(8) Enter "Sélectionnez un seul" into the screen hint prompt.

(9) Click the Save and Close button.

(10) Continue on the next slide.

Slide 4


image


(1) Click the Load Options button highlighted in the image above.

(2) Select the Continent-Countries.xlsx file contained in the downloaded zip folder for this walkthrough.

(3) Select "continents" in the Select Options Sheet dropdown box.

(4) Click the View Loaded Options link highlighted above to see the options loaded from the excel sheet.

(5) Click the Save Screen button at the bottom of your screen.

(6) Continue on the next slide.

Slide 5


image


(1) Select Cascade in the Select Screen Type dropdown box.

(2) Enter "Country" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "2. What country is this city is located in?" into the screen label prompt. Enter "Select only one" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "2. Dans quel pays se trouve cette ville?" into the screen label prompt. Enter "Sélectionnez un seul" into the screen hint prompt.

(10) Click the Save and Close button.

(11) As highlighted in the image above select "Continent" in the Select Reference Screen ID dropdown box.

(12) Click the Load Options button and select the Continent-Countries.xlsx file contained in the downloaded zip folder for this walkthrough.

(13) Select "countries-by-continents" in the Select Options Sheet dropdown box.

(14) Click the View Loaded Options to see the options loaded from the excel sheet.

(15) Click the Save Screen button at the bottom of your screen.

(16) Continue on the next slide.

Slide 6


image


(1) Select Text Input in the Select Screen Type dropdown box.

(2) Enter "City" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "3. What is the name of this city?" into the screen label prompt. Enter "Do not leave blank" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "3. Quel est le nom de cette ville?" into the screen label prompt. Also enter "Ne pas laisser en blanc" into the screen hint prompt.

(10) Click the Save and Close button.

(11) Click the Save Screen button at the bottom of your screen.

(12) Continue on the next slide.

Slide 7


image


(1) Select Integer Input in the Select Screen Type dropdown box.

(2) Enter "Population 1950" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "4. What was the population of this city in 1950?" into the screen label prompt. Type "Enter zero where this data does not exist" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "4. Quelle était la population de cette ville en 1950?" into the screen label prompt. Enter "Entrez zéro lorsqu'il n'y a pas ces données" into the screen hint prompt.

(10) Click the Save and Close button.

(11) In the Min Value (Optional) text box prompt enter 0 as shown in the highlight of the image above.

(12) Click the Save Screen button at the bottom of your screen.

(13) Continue on the next slide.

Slide 8


image


(1) Select Integer Input in the Select Screen Type dropdown box.

(2) Enter "Population 2000" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "5. What was the population of this city in 2000?" into the screen label prompt. Type "Enter zero where this data does not exist" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "5. Quelle était la population de cette ville en 2000?" into the screen label prompt. Enter "Entrez zéro lorsqu'il n'y a pas ces données" into the screen hint prompt.

(10) Click the Save and Close button.

(11) In the Min Value (Optional) text box prompt enter 0 as shown in the highlight of the image above.

(12) Click the Save Screen button at the bottom of your screen.

(13) Continue on the next slide.

Slide 9


image


(1) Select Integer Input in the Select Screen Type dropdown box.

(2) Enter "Population 2050" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "6. What is the projected population of this city by 2050?" into the screen label prompt. Type "Enter zero where this data does not exist" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "6. Quelle est la population projetée de cette ville en 2050?" into the screen label prompt. Enter "Entrez zéro lorsqu'il n'y a pas ces données" into the screen hint prompt.

(10) Click the Save and Close button.

(11) In the Min Value (Optional) text box prompt enter 0 as shown in the highlight of the image above.

(12) Click the Save Screen button at the bottom of your screen.

(13) Continue on the next slide.

Slide 10


image


(1) Select Location in the Select Screen Type dropdown box.

(2) Enter "City Location" into the Screen ID textbox as shown in the image above.

(3) Leave the Input Required box checked.

(4) Click the Add Screen Label button.

(5) Choose English in the Select Language dropdown box shown.

(6) Enter "7. Please get the GPS location of this city" into the screen label prompt. Type "Ensure that you can see the sky above you" into the screen hint prompt.

(7) Click the Save button.

(8) Change the selection in the Select Language dropdown box to French.

(9) Enter "7. S'il vous plaît obtenir la localisation GPS de cette ville" into the screen label prompt. Enter "Assurez-vous que vous pouvez voir le ciel au dessus de vous" into the screen hint prompt.

(10) Click the Save and Close button.

(11) In the Maximum Accuracy text box prompt enter 5 as shown in the highlight of the image above.

(12) Click the Save Screen button at the bottom of your screen.

(13) Continue on the next slide.

Slide 11


image


(1) The new form screen should be similar to what is shown in the image above. Notice all 7 defined form screens on the right.

(2) Click the Save Form button highlighted in the image above to save this form.

(3) Note that this form can be edited by clicking the Edit Form menu.

(4) This lesson is now complete.