Question T14681
Visible to All Users

Survey.Serializer.addProperty

created a year ago

when I change checked not fire onSurveyPropertyValueChanged event
Clipboard-File-1.png

JavaScript
Survey.Serializer.addProperty("questionbase", {     name: "checked",     displayName: "checked",     type: "boolean",     isRequired: false,     category: "general",     // visible: false,     default: false,     // isSerializable: false,     onSetValue: function (surveyElement, value) {       // You can perform required checks or modify the `value` here       // ...       // Set the `value`       surveyElement.setPropertyValue("checked", value);       // You can perform required actions after the `value` is set       // ...     }   });
Show previous comments (5)
LL LL
longming.lai a year ago

    It still not working,when I change upload file to raking,It also set panel of 1.2 Greenhouse Gas Reporting file to government and Remark’s ischeck true,It does not what I want
    Clipboard-File-1.png
    Clipboard-File-2.png

      Hello,
      Thank you for the update. I would appreciate it if you modify my CodeSandbox demo to illustrate the issue.
      I look forward to your reply.

      LL LL
      longming.lai a year ago

        I have modified my approach, how can I monitor the switching of problem types,which event will fire! when the question's type changed , checked property should be seted to true

        example: change from single-line input to file upload

        Clipboard-File-1.png

        Answers approved by surveyjs Support

        created a year ago

        Hi,
        Changing a question type is a modification made to a survey rather than to a question instance. If you wish to track survey changes, handle the creator.onModified event.

        Let me know if you have additional questions.

          Comments (2)
          LL LL
          longming.lai a year ago

            Thank you for your help,I understand

              You're welcome! Please feel free to contact us if you have any further questions.

              Thanks