Change Question Title Colors

Edit in →

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.

Your cookie settings

We use cookies to make your browsing experience more convenient and personal. Some cookies are essential, while others help us analyse traffic. Your personal data and cookies may be used for ad personalization. By clicking “Accept All”, you consent to the use of all cookies as described in our Terms of Use and Privacy Statement. You can manage your preferences in “Cookie settings.”

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.