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).
Steps to Reproduce
- In PegaSurvey, add a Survey.
- In the Survey, add Question with Complex Checkbox/Complex Radio buttons.
- Preview the Survey and inspect the complex checkbox/radio buttons by pressing F12 and found that no <label> element is getting generated.
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.
0% found this useful