Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Complex Checkbox and Complex Radio in PegaSurvey need <label>



Simple checkbox and Radio button control in PegaSurvey, the <label> element gets created in PegaSurvey after HFix-35878(by backporting US-153733).

Complex Question uses a different setup. Custom styling for checkboxes/radio button does not show when the caption of the checkbox is left empty.

Pega does not add the <label> element if the caption is left empty.
The result is that the Checkbox cannot be styled, since the styling in the CSS is applied via the label of the control.
This <label> element is required to style on the label as the input has limitations for complex styling (no ::before and ::after pseudo-selectors).

Error Messages

Not Applicable

Steps to Reproduce

  1. In PegaSurvey, add a Survey.
  2. In the Survey, add Question with Complex Checkbox/Complex Radio buttons.
  3. Preview the Survey and inspect the complex checkbox/radio buttons by pressing F12 and found that no <label> element is getting generated.

    Root Cause

    Complex questions of type checkboxes / radio buttons does not use Out-of-the-box (OOTB) controls as grouping the controls is not supported OOTB as of now.

    Survey is using template based approach to display these questions and for that all the question type should be using identically structured templates.

    As per current design, PegaSurvey does not use labels for any of these controls as complex questions require a group label for some of the question types.


    Perform the following local-change:

    1.Override ComplexQuestionCheckboxTemplate / ComplexQuestionRadioButtonsTemplate in Application ruleset and change the provided non auto-generated control.
    2.Save as the existing control pzComplexCheckBox / RadioButtonComplexQuestionSurvey & Activity:RadioButtonComplexQuestionSurvey.
    3. Make the necessary changes (a dummy label may be required here with visibility hidden) to support this use case.

    Published December 12, 2017 - Updated December 2, 2021

    Was this useful?

    0% found this useful

    Have a question? Get answers now.

    Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

    Did you find this content helpful?

    Want to help us improve this content?

    We'd prefer it if you saw us at our best.

    Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

    Close Deprecation Notice
    Contact us