Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let displayQuestionnaire = function () {
let wrapperId = 'questionnaire-display-section';
let wrapper = $('#' + wrapperId);
if (wrapper.length > 0) {
Survey.StylesManager.applyTheme("darkblue");
Survey.surveyStrings.emptySurvey = "There is not currently an active survey.";
Survey.surveyStrings.loadingSurvey = "Please wait. The survey is loading…";
Survey
.JsonObject
.metaData
.addProperty("questionbase", "qnum");
let json = wrapper.data('content');
json.questionTitleTemplate = "{qnum}. {title}";
json.requiredText = "(*)";
json.showQuestionNumbers = "off";
json.pages.forEach(function (page) {
page.elements = setQuestionNumbers(page.elements);
});