Question T14597
Visible to All Users

JSON Edit not working in survey-creator-jquery

created a year ago

Clipboard-File-1.png

Code
var localStorageName = "SaveLoadSurveyCreatorExample";     const options = {       showDesignerTab: true,       showTestSurveyTab: true,       showLogicTab: true,       showTranslationTab: true,       showJSONEditorTab: true,       showThemeTab: true,       alwaySaveTextInPropertyEditorsValue:true,       isAutoSave: true,       // Show state button here       showState: true,       saveSurveyFunc: function (saveNo, callback) {         window.localStorage.setItem(localStorageName, creator.text);         //We assume that we can't get error on saving data in local storage         //Tells creator that changing (saveNo) saved successfully.         //Creator will update the status from Saving to saved         callback(saveNo, true);       },     };     function renderCreator(options) {       const json = !!creator ? creator.JSON : {};       creator = new SurveyCreator.SurveyCreator(options);       creator.JSON = json;       creator.showSidebar = false;       creator.toolbox.forceCompact = false;       creator.render("surveyElement");     }     renderCreator(options);

Clipboard-File-2.png
Clipboard-File-3.png

JSON Editor is empty

Comments (1)

    logic also empty

    Clipboard-File-1.png

    Answers approved by surveyjs Support

    created a year ago

    Hello,
    Please open the browser console and check for any errors that may appear there. Ensure that you are using the same version of SurveyJS libraries throughout your application.

    It may be helpful to verify your project setup by following our "Getting Started" tutorial and checking out the GitHub demo linked there: Add Survey Creator / Form Builder to a Knockout or jQuery Application.

    Additionally, I've created a CodeSandbox for your reference: Survey Creator for React.

    Please let me know how it goes.