Question T3480
Visible to All Users

Hiding Timer/Quiz tab in Properties

created 5 years ago

I have a need to hide this tab. I found another question asking the same thing and while there was no code showing specifically how to do it, it seems that at that time you were using the SurveyEditor while I am using the SurveyCreator. Is there a difference? Can I hid this tab using the SurveyCreator ?

Answers approved by surveyjs Support

created 5 years ago

Hello Eric,
The code should work in the same way. If you hide all properties, then the tab will be hidden as well. You can hide the tab completely. Here is the code:

JavaScript
function makeTabsInvisible(tabs, names) { for (var i = 0; i < tabs.length; i++) { if (names.indexOf(tabs[i].name) > -1) { tabs[i].visible = false; } } } makeTabsInvisible(SurveyCreator.SurveyQuestionEditorDefinition.definition["survey"].tabs, ["timer"]);

This code should be run before SurveyCreator constructor.

Thank you,
Andrew
SurveyJS Team