Question T13890
Visible to All Users

Show Title has No Effect inside Creator Preview

created 2 years ago

Hello,

disabling the title of a survey leads to it still being shown in the creator preview:

Clipboard-File-1.png

Is this intentional (as the creator is considered WYSIWYG)?
If so, is there a way to change this behavior?

Thanks,

Lucas

JSON
{ "title": "Title of Survey", "pages": [ { "name": "page1", "elements": [ { "type": "text", "name": "question1" } ] } ], "showTitle": false }

Answers approved by surveyjs Support

created 2 years ago

Hello,

You entered some text in survey title. That's why it's visible on preview.

If you want to disable survey title editing, you can use the following option:

Code
allowEditSurveyTitle: false,

Here is the sample code:

JavaScript
const options = { allowEditSurveyTitle: false, }; const creator = new SurveyCreator.SurveyCreator(options);

In this case survey title willn't be available neither in design tab nor in preview one.

Thanks, Serge
SurveyJS Team

    Show previous comments (1)

      Hello,

      To hide progress bar you can use the https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#showProgressBar property.

      As for page counter - could you specify - what do you mean? Probably if you share your survey JSON and describe your requirements my suggestions could be more precise.

      You can mark this ticket as private if you share your survey JSON here.

      Thanks, Serge
      SurveyJS Team

        Hello Serge,

        by page counter I meant the text below the progress bar. Since the total number of pages changes in my survey with the answers a user enters, I don't wanna confuse people with the actual number, but just show the overall progress. Somebody asked the same thing here: https://surveyjs.answerdesk.io/ticket/details/t2551

        Overall I was able to solve everything as follows (hopefully that clears things up):

        CSS
        /* hide header in creator */ .svc-designer-header { display: none; } /* remove page numbers and reduce margin that was used to create space for that text */ .sd-progress__text { display: none; } .sd-progress { margin-bottom: calc(2 * var(--base-unit)); }

        This gives no title, progress bar or page numbers in the creator (not functional anyway) and reduces everything to only the progress bar when displaying the survey.

        I have another issue regarding the progress bar but I'll open another ticket.

        Thanks,

        Lucas

          Glad to know the issue has been resolved.

          Thanks, Serge
          SurveyJS Team