Previous Next

To open or use this sample form, go to the Design tab, scroll down to the Your forms and datasets section, and click + then Start new form; then enable Use a sample form as your starting point and choose The basics: Common elements in any form from the list. You can also click here to download the spreadsheet form definition.

The spreadsheet form definition includes three worksheets: survey, choices, and settings:

Starting with the survey sheet, you will see that it begins with a set of hidden fields that will be automatically filled in with information from the survey device:

typename
startstarttime
endendtime
deviceiddeviceid
subscriberidsubscriberid
simserialsimid
phonenumberdevicephonenum

These fields never show up to users filling out surveys, but they provide useful data for tracking and back-end analysis. (In the form designer, all of these fields are hidden in Form settings.)

The next field is a note field which does show up to users but does not prompt for any input:

typenamelabel
noteintronoteWelcome to the sample form. Please swipe forward to continue.

This is how that note will appear to users in SurveyCTO Collect:

The next field is a multiple choice field, which uses the select_one field type:

typenamelabel
select_one yesnoconsentWould you like to continue?

The answer choices to this multiple choice question are listed on the choices sheet:

list_namevaluelabel
yesno1Yes
yesno0No

For each option in the "yesno" list, there is a label (which will appear to users) and a value (which is the associated value that will appear in the data). This is how this multiple choice question will appear to users:

If the user answers "No" to the above question, then the survey ends. This is accomplished by grouping all other survey fields into a single group and setting this group to only be relevant when the user answers "Yes":

typenamelabelrelevance
select_one yesnoconsentWould you like to continue? 
begin groupconsentedSample survey module${consent}=1
...   
end groupconsented  

In this case, the relevance column was used to create a skip pattern.

Inside the group of questions, the first field is a text field:

typenamelabel
textnameWhat is your name?

This is how the question will appear on a mobile device:

The next field is an integer field:

typenamelabel
integerageWhat is your age?

And this is how it will appear to users:

Finally, this form integrates dynamic content into the survey. The label for the last field incorporates answers from earlier in the survey:

typenamelabel
noteconfirmnoteYour name is ${name} and your age is ${age}. Thank you.

In this case, the note seen by the user will integrate the survey respondent's name and age because we used the ${fieldname} syntax to refer to those fields. (And if SurveyCTO Collect is configured to hyperlink field references, users will be able to click on the name or age to jump back and change them.)

Previous Next