Accessibility Compliance
SurveyJS libraries meet a variety of WCAG and Section 508 standards. Run AXE® Validation to assess this demo’s accessibility level.

Individual Checkbox Comments

Edit in →
Survey Creator

Any SurveyJS question can include a comment area that allows users to explain or elaborate on their answer. For select-based questions—such as Dropdown, Radio Button Group, and Checkboxes—you can also enable comment areas for individual choice options. This example demonstrates how to configure and use this feature.

Individual Choice Comments Configuration

To enable a comment area for a specific choice option, set its showCommentArea property to true. You can also set the isCommentRequired property to make the comment mandatory when that option is selected.

To guide users on what to enter in the comment area, use the commentPlaceholder property. You can set this property within a choice item configuration object to apply the placeholder only to that item or set it on the question level to apply the same placeholder to all comment areas.

Data Format

When individual choice comments are enabled, the question's value format changes as follows:

  • For single-choice questions (e.g., Dropdown or Radio Button Group), the value changes from a primitive to an object.
  • For multiple-choice questions (e.g., Checkboxes), the value changes from an array of values to an array of objects.

Each object contains the following properties:

  • value
    A selected choice value. You can rename this property using the question's valuePropertyName setting.

  • comment
    A comment provided for that choice.

Example:

When individual choice comments are disabled:

{
  "car": [
    "Ford",
    "Volkswagen"
  ]
}

When individual choice comments are enabled:

{
  "car": [
    {
      "value": "Ford",
      "comment": "Comment for Ford"
    },
    {
      "value": "Volkswagen",
      "comment": "Comment for Volkswagen"
    }
  ]
}

"Other" Choice Item Configuration

The "Other" item lets users provide a custom answer not listed in the choices. To enable it, set the question's showOtherItem property to true.

The "Other" comment area inherits the question-level commentPlaceholder value, if set. You can override it using the otherPlaceholder property.

Checkbox questions also support other special choice options, such as "None", "Select All", "Don't Know", and "Refuse to Answer". For more details, refer to the Documentation section in the Checkboxes Question demo:

View Checkboxes Question Demo

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.