Question T13200
Visible to All Users

Survey Creator - Disable Editing for the Logic tab

created 2 years ago

Dear SurveyJS team,

I am working on the Survey Creator feature. For my business logic, I want to clone a new schema from an existing schema and allow editing of survey title only. Is it possible to do that?

Best regards,
Skul

Clipboard-File-2.png

Answers approved by surveyjs Support

created 2 years ago

Hello Skul,
If you want to keep only designer tab editable then you can use the creator.onActiveTabChanging event to change creator "readOnly" property.

JavaScript
creator.onActiveTabChanging.add((sender, options) => {   creator.readOnly = options.tabName !== "designer"; });

Here is the example.

    Show previous comments (1)

      You are very welcome!

      Andrew
      SurveyJS Team

        Hi Jane,

        I have a new problem with the question type "image". It is still editable, so is there any API to hide the image question controls?

        Thanks.

        Clipboard-File-1.png

          Hello,

          I created a separate ticket on your behalf: T13395: Set a Image Question read-only. We placed it in our processing queue and will process it shortly.

          created 2 years ago

          Hello Skul,
          You can use Survey Creator API to prevent users from modifying a form and allow editing a survey header only.

          Please refer to the following demo: Setup for a Content Manager. It shows how to restrict Survey Creator capabilities and allow users to only edit a form title and description.

          Should you have any questions or require further assistance, we are here to help.

            Comments (3)

              Hello Jane,
              First of all, thanks for your suggestion. I followed that example and it works well.

              But there are 2 issues that I can not solve:
              1/ The Rating Scale question can still insert/delete.
              2/ The Logic tab is still editable.

              Rating Scale
              Logic Tab

              Is there any API to solve those problems?

              Thanks

                Hi Skul,
                Thank you for the update.

                Would you please clarify how should the Logic tab appear? Do you wish to show logic rules in read-only mode?

                Regarding the Rating Scale: I created a separate issue in this regard.
                T13236: Rating Scale - Disable add / remove options for rate items.

                We placed it in our processing queue and will process it shortly.

                  Hi Jane,

                  About Logic tab, I just want to show it in read-only mode. As I described above, the work-flow should be:
                  1/ Create a new schema with logic rules and store it in the database.
                  2/ Clone (create) another schema based on the schema created in step 1 and edit the survey title only (logic rules, pages, … are the same in 2 schemas).

                  Thanks.