[Ticket cloned from T13553: Display a comment box for every survey question in PDF]
Thanks Jane for your response working fine now!
Just one more question, Can you tell us, How we can update comment color to gray?
[Ticket cloned from T13553: Display a comment box for every survey question in PDF]
Thanks Jane for your response working fine now!
Just one more question, Can you tell us, How we can update comment color to gray?
Hello Santosh,
To change the color of a question's comment, you can obtain a Comment box brick from options.bricks
and change its textColor
attribute. Consider this demo:
JavaScriptsurveyPDF.onRenderQuestion.add((survey, options) => {
...
// Change the color of a comment
if (!!options.bricks[1]) {
var questionCommentBrick = options.bricks[1].unfold()[1];
questionCommentBrick.textBrick.unfold()[0].textColor = "gray";
}
});
Let me note that the structure of PDF bricks may vary depending on a question's structure. You can research the structure of a question's bricks and determine a required brick.
Should you have any questions or require further assistance, we are here to help.