Question T22534
Visible to All Users

Cannot drag survey elements in creator

created 4 days ago

I am not able to drag survey elements into the my survey in the creator. I also cannot drag any elements already in a survey as well to change where a question is in my survey.

Show previous comments (1)

    Hello,

    I am using asp core .net 8 as my environment.

    Originally was using version 1.12.26 of the creator package however, I have recently upgraded to 2.0.2.

    I have 0 errors in my browser console when on the creator page.

    Here is how I have my creator setup in javascript and html

    In my cshtml file I have the following resources

    Code
    <link href="https://unpkg.com/survey-core@2.0.2/survey-core.min.css" type="text/css" rel="stylesheet"> <script type="text/javascript" src="https://unpkg.com/survey-core@2.0.2/survey.core.min.js"></script> <script type="text/javascript" src="https://unpkg.com/survey-js-ui@2.0.2/survey-js-ui.min.js"></script> <script src="https://unpkg.com/survey-core@2.0.2/themes/index.min.js"></script> <script src="https://unpkg.com/survey-creator-core@2.0.2/themes/index.min.js"></script> <link href="https://unpkg.com/survey-creator-core@2.0.2/survey-creator-core.min.css" type="text/css" rel="stylesheet"> <script src="https://unpkg.com/survey-creator-core@2.0.2/survey-creator-core.min.js"></script> <script src="https://unpkg.com/survey-creator-js@2.0.2/survey-creator-js.min.js"></script> <script src="https://unpkg.com/ace-builds/src-min-noconflict/ace.js" type="text/javascript"></script> <script src="https://unpkg.com/ace-builds/src-min-noconflict/ext-searchbox.js" type="text/javascript"></script>

    and then I have the creator rendering like this

    Code
    <div class="col-md-12 mt-1"> <div class="form-row align-items-center p-0 m-0 m-1"> <div class="col-md-12 p-0 m-0"> <div id="surveyCreator" style="height: 100vh;"></div> </div> </div> </div>

    Then for my JavaScript file

    Code
    const creatorOptions = { showThemeTab: true };

    const creator = new SurveyCreator.SurveyCreator(creatorOptions);

    then I use custom questions that are created by building JSON through C# and add them to the toolbox like this

    JavaScript
    creator.toolbox.defineCategories([ { category: "Custom Dropdown Questions", items: [ "activityCategoryDropdown", "yesNoDropdown", "campusesDropdown", "programStatusDropdown", "objectCodesDropdown", "districtsDropdown", "regionsDropdown", "fundingSourceDropdown", "diStudentGroupCategoriesDropdown", "studentUiDropdown", "visionGoalSummaryTypeDropdown", "activeProgramListDropdown", "baselineYearDropdown", "activeDiStudentGroupsDropdown", "studentUiDropdownInPlan" ] }, { category: "Custom Checkbox Questions", items: [ "activeDiStudentGroupsCheckbox", "diStudentGroupsInPlanCheckbox" ] }, { category: "Custom Matrix Questions", items: [ "objectCodeAndDollarAmountMatrix", "fundingCategoriesMatrix", "activeStudentDiGroupsMatrix", "objectCodesInPlanMatrix", "fundingCategoriesInPlanMatrix", "diStudentGroupsInPlanMatrix", "activityCategories", "visionGoalsInPlanMatrix", "sharedProgramFundingMatrix" ] }, { category: "Custom Panel Questions", items: [ "visionGoalsPanel", "studentDiGroupsPanel" ] }, { category: "Choice-Based Questions", items: [ "dropdown", "checkbox", "radiogroup", "tagbox", "imagepicker" ] }, { category: "Text Input Questions", items: [ "text", // Override the display title { name: "comment", title: "Multi-Line Input" }, "multipletext" ] }, { category: "Read-Only Elements", items: [ "image", "html", // Override the display title { name: "expression", title: "Expression" } ] }, { category: "Matrices", items: [ "matrix", "matrixdropdown", "matrixdynamic" ] }, { category: "Panels", items: [ "panel", "paneldynamic" ] } ], true) creator.toolbox.allowExpandMultipleCategories = true; creator.toolbox.showCategoryTitles = true; creator.toolbox.forceCompact = false;

    This is how I am rendering the creator in JavaScript

    Code
    document.addEventListener("DOMContentLoaded", function () { creator.render(document.getElementById("surveyCreator")); });

    Please not that the creator was working fine before I upgraded to 1.12.26 and then did not get resolved as I upgraded to 2.0.2

    The interesting thing I I found is that even on SurveyJS demos I was not able to drag any elements in the creator.

    Thank you

      I also found with version 2.0.2 that the creator is loading in very slowly once again this is something I noticed on the SurveyJS demos as well.

        Hello,
        Thank you for the update.
        I tried to apply your code in a sample, however, I didn't get any mentioned issues (View Plunker).

        I'm afraid that I need to get a reproducible demo to reproduce the issue on my end. I would appreciate it if you create a simplified demo and send it to us for research.

        Thank you