Title Customization
Question and page titles provide context and help organize survey content into logical sections. This example demonstrates built-in title customization options.
Title Anatomy
Question and page titles consist of the following parts:
- Title text
- (Optional) Question or page number
- (Optional) A symbol or text that indicates a required question or page
Title Text
To set title text for a question or page, specify the title
property. If you leave it unspecified, a question displays the name
property value as a title, while a page displays no title.
Question Numbers
Questions are numbered starting with 1. If you want to start numbering with a different number or use letters instead, specify SurveyModel
's questionStartIndex
property. You can include desired prefixes and postfixes in the property value. In this demo, you can change the questionStartIndex
property value at runtime using the Settings panel.
For more information on how to manage numbering within your survey, refer to the following demo: Question Auto-Numbering.
Required Mark
Questions that require an answer are marked with an asterisk *
. You can use SurveyModel
's requiredText
property to set another symbol or specify an explanatory text string. Open the Settings panel to change the required mark in this demo.
Title Pattern
You can arrange the question title, number, and required mark in different sequences. To do this, specify one of the questionTitlePattern
property values: "numTitleRequire"
, "numRequireTitle"
, "numTitle"
. Use the Settings panel to see how these values affect question titles.
Dynamic Placeholders
Panels and questions support placeholders that may be useful in titles:
{pageno}
The current page number.{pagecount}
A total number of visible pages.{correctanswers}
The number of correct answers in a quiz survey.{incorrectanswers}
The number of incorrect answers in a quiz survey.{questioncount}
A total number of visible questions.
In this demo, page titles use the {pageno}
and {pagecount}
placeholders.