The questionnaire view is a CSPro feature that displays the contents of a case and its components (dictionary, forms, question text) in a read-only mode that facilitates reviewing or printing. The questionnaire is displayed in an
embedded web browser.
The questionnaire view is available in the following contexts:
There are two ways that an enumerator can view a questionnaire while using CSEntry. It is possible to disable this functionality for instances when you may not want an enumerator to view an entire case:
- The enumerator can right-click (or hard-press) on the case listing and select View Questionnaire. This displays the selected case. To disable this functionality, add Lock=View to the data entry PFF.
- While collecting data, the enumerator can select View > Questionnaire. This displays the currently-open case. To disable this functionality, add an OnViewQuestionnaire function override that suppresses the display. This special global function is called anytime an enumerator attempts to view a questionnaire.
By using the
Action Invoker, it is possible to manually create the input used by the questionnaire view. The action
Application.getQuestionnaireContent returns the input necessary to build the questionnaire view, or you can create each component separately. For example:
// construct the input needed for the questionnaire view, using the external dictionary
// attached to this application but getting the forms and question text from the disk
string questionnaireViewInput =
maketext("{ \"dictionary\": %s, \"forms\": %s, \"questionText\": %s, \"case\": %s }",
CS.Dictionary.getDictionary(name := "MARINE_DICT"),
CS.Application.getFormFile(path := "Marine Mammals Survey.fmf"),
CS.Application.getQuestionText(path := "Marine Mammals Survey.ent.qsf"),
CS.Data.getCase(name := "MARINE_DICT"));
// pass this input to the questionnaire view
CS.UI.view(path := Path.concat(html, "questionnaire-view", "index.html"),
inputData := @object questionnaireViewInput);