Skip to content
Snippets Groups Projects
Commit b4bb24af authored by Anthony's avatar Anthony
Browse files

Hide question title on quizz with only one question and with question title like pgXXX

parent edc505cd
Branches
No related tags found
No related merge requests found
......@@ -47,6 +47,16 @@ $(function () {
// Load survey model from JSON
const survey = new Survey.Model(jsonStatic);
const questions = survey.getAllQuestions();
if(questions.length === 1) {
console.log("Survey has only one question");
console.log(questions[0]);
const regex = /pg\d\d\d/g;
if(questions[0].title.match(regex)) {
questions[0].titleLocation = "hidden";
}
}
// Instantiate `markdown-it`
const converter = markdownit({
html: true // Support HTML tags in the source (unsafe, see documentation)
......
Subproject commit 37c5cd01ed787d99267a8b09eb1f942649df09b8
Subproject commit a6970e449194b8568d9303f099ef591025180f58
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment