Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Overview

If you want to define a default response to a question, there are a few ways to do this: 

  1. If you want the default value for a question to be a simple number or simple text, under 'Question Properties' → 'Advanced Properties', there is the 'Default Data Value' field. You can enter things in here like numbers (e.g. 0) and text (e.g. yes), although be sure  not  to include quotes around integer and text default values or it will not work and your application may fail in mysterious ways. You will need to put single quotes around a default value for a date question, i.e. '2010-01-01' in order for it to display properly.This field does not currently support hidden values (e.g. /data/loaded_case_property_hidden_value). 
  1. If you want the default value for a question to be a case property, then, outside the form itself, in the 'Case Configuration' pane for the form, you can load a case property directly into the question itself, and this will then show up as the default/pre-selected response for that question. This will even work for a single select question if the case property is the 'question ID' for the default response required (e.g. 'yes').
    This will also even work for multi-select questions, if the  value loaded into the multi-select question is a string of the Question ID's of the default responses desired separated by spaces. This functionality could be useful, for example, if you want to have an Update Registration or Modify Registration form that preloads the response to a given question entered at registration. So, say you have a registration form with a Multi-Select question to find out the occupation of a woman and during registration you check-marked three of the choices: farmer, seamstress, and hairdresser. The response to this question could be saved in the case property as something like 'farmer seamstress hairdresser'. If you load that case property back into the same question in the Modify Registration form, 'farmer' 'seamstress' and 'hairdresser' will show up pre-checked.
  • No labels