Question T12973
Visible to All Users

How to show question description and title description?

created 2 years ago

Hi Team,

Can you please guide us on how to show question description and title description in below sample.

https://codesandbox.io/s/surveyjs-angular-forked-07bnm8?file=/src/app/components/pdf.component.ts

Answers approved by surveyjs Support

created 2 years ago

Santosh,
To show a question's title and description, add the corresponding settings to a survey JSON model. I updated your sample to show the idea: https://codesandbox.io/s/surveyjs-angular-forked-07bnm8?file=/src/app/components/json.ts.

Let me know if you have further questions.

    Show previous comments (1)

      Hi,
      If you wish to display a description for a survey element (a page, panel, or question), you need to specify both title and description settings. Without a title, a description won't be shown.

      JavaScript
      export const json = { pages: [ { name: "page1", title: "Page 1", description: "My Page", elements: [ { type: "panel", name: "panel1", elements: [ { type: "text", name: "question8", title: "My Question", description: "Some Description", defaultValue: "Visit https://surveyjs.io/" } ], showQuestionNumbers: "off" } ] } ] };

      https://codesandbox.io/s/surveyjs-angular-forked-07bnm8?file=/src/app/components/json.ts:0-524

      For more information on available settings, refer to Survey Model and Elements API.

      Let me know if you have additional questions.

        Hi Jane!

        Is there any option for giving font size to descriptions?

          Hello Santosh,

          I created a separate ticket on your behalf: T13017: Is it possible to change the font size for description? and answered the question.

          Thank you,
          Andrew
          SurveyJS Team