1: Attributes for Question Settings
displayOnError - Specify Which Questions to Show on Error
displayOnError attribute controls can be set to "bad" or "all" and controls which questions are displayed on a page if a validation error occurs.
displayOnError="all" is specified, then all questions that exist on the page will be shown along with the error message(s).
displayOnError="bad" is specified, then only the question that received the error will be shown with the error message(s).
html:showNumber - Set to Show Question Numbers
html:showNumber attribute is a boolean value that controls whether or not to show a number alongside each question see by the respondent. Regardless of the labels provided, each question will be numbered starting with 1.
e.g. 1. What is..., 2. Please specify..., 3. Choose one of...
If a question is skipped, the question numbering will skip as well. For example, you may see "1." immediately followed by "5." if each question in between was skipped.
newVirtual - Set to Use Python Virtual Elements
newVirtual attribute is implicitly added for all surveys
newVirtual="1" is specified (default), then you can use the same syntax for <virtual> elements as you do for all other survey elements (e.g. Python code).
pipeAltLabels - Set to Use Alternative Labels for Pipes
pipeAltLabels attribute allows you to pipe question responses using the question's
altlabel attribute instead of the
For example, if
pipeAltLabels="1" is specified, then the following will work as expected:
<radio label="Q1" altlabel="Baby_Gender"> <title>Is it a...</title> <row label="r1">Boy</row> <row label="r2">Girl</row> </radio> <suspend/> <html label="Congrats" where="survey">Congrats on your [pipe: Baby_Gender lower]!</html>
pipeErrors - Set to Generate a Fatal Error for Invalid Piping
pipeErrors attribute allows you to generate a fatal error whenever the system encounters invalid piping. By default, invalid piping will be displayed as text within the survey.
For example, if you would like to pipe in "some_pipe", but forget to set
p.some_pipe, your pipe would appear as "INVALID PIPE '[some_pipe]'" in the survey.
pipeErrors attribute can be applied only to persistent variable piping;
[pipe:question_not_found] will always show a textual error.
uses - Set Which Dynamic Question Styles to Use
uses attribute allows you to specify global styles to apply across the entire survey.
For example, if
uses="fir.2" is specified, all applicable questions (radios & checkboxes) will use the Form Image Replacement dynamic style. As illustrated below, you can specify default values to use for the question style inside the <survey> element:
<survey name="Survey" ... ... uses="fir.2" fir:icon_css="color: red;" ... ...>
Click here to learn more about the current dynamic question version numbers currently used.
2: What's Next?
More information about all of the <survey> element's attributes are provided in the documents below: