In this article
Directives contain instructions to the WI generator - . Six different directives exist, which are used to control page break insertion, navigation and progress bar start and end points. By default, a Directive will be set to Multiple questions per page.
- Multiple questions per page - Authoring groups as many questions on a page as possible - .
- One question per page - Authoring inserts a page-break between each question, so only one question appears on each page - .
- Progress bar begin - the progress bar starts from this point. This allows you to have some questions or pages, for example information or personal questions, before the progress bar starts, so you can keep the progress bar just for the "survey questions".
- Progress bar end - defines the end point of the progress bar. This allows you to place information or other pages, for example a "thank you" page, outside of the progress bar, keeping the bar only for the "survey questions".
- Forward navigation only - a theme can be used to remove the Back button from the interview pages, but this method is not fool-proof; it is possible to work around it. This directive removes the Back button from subsequent interview pages irrespective of whether or not the button is included in the survey's layout, if the condition logic is met. Note that if the interview's survey settings require the browser Back button to act like the survey Back button, when this directive is in use the browser Back button will not function for the survey. Use the Survey defined navigation directive to re-display the Back button. Note also that this directive will take effect even if it is located inside a condition that is skipped.
- Survey defined navigation - when a Forward navigation only directive had been used to remove the Back button, use this directive to re-display the button according to the survey settings and theme currently in use.
Figure 1 - Selecting a Directive type
Authoring evaluates all logic on the server. When the “multiple questions per page” directive is in effect, forms will be grouped on the same page unless the WI generator:
- encounters a condition, script node, or a new directive in the survey definition,
- detects a dependency between two forms as a result of text piping that prevents them from being displayed on the same page, or
- is unable to determine whether there could be a dependency between a form and those that have already been added to a page.
Figure 2 - Example of a multiple questions directive
Figure 3 - Example of a single question directive
Progress bars are displayed if the Web interview is generated with the Include Progress Bar option selected in the Designer > Survey Settings > Layout tab. The progress bar will display as a fraction of the number of questions displayed on pages up to and including the current page relative to the total number of questions between the progress bar start and end points. If a survey contains no progress bar directives, then the progress bar start and end points are the beginning and end of the survey. Progress bar directives give the survey author the ability to insert multiple progress bars in the survey, which is useful if the Survey consists of several distinct sections and only a small fraction of the questions apply to each individual respondent.
Note: Progress bar directives cannot be nested. A "Progress bar begin" directive that appears after a previous unmatched Begin directive will be ignored, as will a "Progress bar end" directive that is not preceded by a Begin directive. No progress bar is displayed before the initial Progress bar begin directive and no progress bar is displayed after the final progress bar end directive.