Change Question Title Colors
This demo example shows how to change the color of question titles in a generated PDF form. This feature is especially useful for quiz and test results—you can visually indicate correctly and incorrectly answered questions using color. To generate a PDF form with applied customizations, answer the quiz questions and click the "Download PDF" or "Preview PDF" button.
Customize Question Titles
To customize question title colors, handle the onGetQuestionStyle event. Within the event handler, use the options.style configuration object to obtain and customize styles applied to an individual form field. To apply a custom color to a question title, modify the options.style.title.fontColor property.
You can specify colors directly (for example, using hex values like "#00ff00" for green and "#ff0000" for red), or obtain them from the current survey theme if you prefer consistency with other styling. To obtain these colors, use the options.getColorVariable function.
Customize Choice Options
To modify the appearance of a choice's mark and label, handle the onGetItemStyle event. Within the event handler, use the options.style configuration object to modify the appearance of a choice item.
Refer to the code listing for more information.