-1

I am programming a survey in SurveyJS. One question has "type": "text" and shows an input field over one line. Users may write multiple lines, so I would like a paragraph type, but could not find one.

How do I allow users to write multiple lines in SurveyJS?

1 Answer 1

0

Use "type":"comment" , which shows text over multiple lines. It's also called the Long Text question type. Here is an example:

const question = {
  "elements": [
    {
      "name": "observations",
      "title": "Do you have any other comments?",
      },
      "type": "comment",
      "isRequired": true,
    }
  ]
}

https://surveyjs.io/form-library/documentation/api-reference/comment-field-model

Sign up to request clarification or add additional context in comments.

1 Comment

Please post actual code since the link you posted can be changed by surveyJS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.