Questionnaire

A user will be asked a series of questions to get to an answer. This is not a form to submit information or data

Overview

Create a Questionnaire if you want to ask users certain questions and then display an answer based on the selections.

Questionnaires don't submit any information like a form. It is purely used to display a text answer.
Example

A live example can be found on the Adults and Children's decision trees.

A screenshot of a completed questionnaire:-

An example of a Sitecore questionnaire

WCMS use

Location

In Content Editor navigate to common-content and create a folder (mirroring where your page sits in the main navigation tree). The questionnaire rendering doesn't fall under any particular common-content item like Headered Text or Text Block so think ahead of where you want it located.

Create a question

Right click the folder and choose Insert and then Insert from template. Navigate to templates, Form Templates, Questionnaires and then select Question. Give the question a name in Item Name and select Insert. The icon will show in the navigation as a question mark.

Type your question in the QuestionText field.

The QuestionDescription field is not used on the page. It's useful to put in the Show editor field reminders of what answers you have on the child pages

Create an answer

Right click your question in the navigation tree and choose Insert and then select Answer. Give the answer a name and select OK. The icon will show in the navigation as an exclamation mark.

You must order the navigation tree correctly for your questionnaire to show expected results.
A questionnaire setup example of the Sitecore navigation tree

Explanatory Information field

If you get to a part of your questionnaire where the answer is the final part of that tree section then choose Show editor in the Explanatory Information field. Put in your desired text that you want the user to know as a result.

Adding your questionnaire to a page

Create a landing page and then press on the top rendering in Experience Editor. Choose Add here and then Questionnaire. Choose Select. Press OK when the ‘Control Properties’ box appears.

Press 'Select a datasource' then choose the drop down icon next to the blue plus. Press Add associated content. Find your first question in common-content.

Don’t add any answer renderings. When the user selects an answer to the first question, the page will refresh with the next question.
This is the only way to display the answer. If the user selects View results then more info is displayed. on how they came to that answer.
MVC.net use
Code
Version and status
  • current version
  • Concept