Cart Buy Licenses Contact Support Login/Register
v 1.8.25

Version: v1.8.26, estimated release date is Tuesday, January 19, 2021, Total Issue Count: 8

Product Type Description
survey-library Enhancement Add Croatian language translation
survey-library BreakingChange Remove question from it's previous parent container before adding into a new one

Right now this code will duplication question1 if it belongs to the first page: js survey.pages[1].addElement(survey.getQuestionByName("question1")); We should remove it from the previous parent container before adding to the new one.

survey-library Bug Do not reset dropdown question value in survey data on loading items from the web services

On using "choicesByUrl" property when choices are loaded from the web service, we reset the value to "undefined" before setting the value from choices. It requires to notify UI about value change, otherwise UI elements doesn't know that they need to update their value. In early versions, we took the question value directly from survey. During performance optimizations about a year ago we started to cache the question value in the question object and synchronize question value property and survey data. It means if the previous value exists in new choices, that came from the web service, we don't need to notify survey about question value changing and reset (make undefined and then set the value back) the question value property only. It will be enough to notify UI about the change and update the UI elements accordingly.

survey-library Bug question defaultValueExpression doesn't support async functions

The current version executes defaultValueExpression in a non async mode and as result if there are async functions in this expression, then the result will be incorrect.

survey-library Bug Vue: Set survey property value break survey navigation after version 1.8.9

What is the current behavior?

How would you reproduce the current behavior (if this is a bug)?

  1. go to https://9yhjm.csb.app/
  2. click nextpage button, goto 2nd page.
  3. click prevpage, click does not work any more.

image

PrevPage button does not work.

What is the expected behavior?

prevPage button should work.

Provide the test code and the tested page URL (if applicable)

works in 1.8.9 https://codesandbox.io/s/surveyjs-vue-forked-wmuzw?file=/src/components/SurveyComponent.vue fail in 1.8.10 https://codesandbox.io/s/surveyjs-vue-forked-9yhjm

    this.survey = new Survey.Model(json);
    // after version  1.8.9, set locale break navigation 
    // How to reproduce:
    // chose a version after 1.8.9. say 1.8.10.
    // click nextpage button, goto 2 page.
    // then click prevpage, click does not work any more.
    this.survey.locale = "ja";

I tracked the code and find this change might related to this bug.

https://github.com/surveyjs/survey-library/commit/cc67fbfe766fdb8f83c553e305e14aa5b2e26548

survey-creator Enhancement Add croation language translation
survey-creator Enhancement Sort by text (question/panel/page title) elements in elementSelector widget

We do not currently sort elements and it is hard to select an element if there are a lot of items in a dropdown. We should sort them by displaying text.

survey-analytics Enhancement Gauge Customization

need to create an example

based on https://surveyjs.answerdesk.io/ticket/details/T5980

Version: v1.8.26, estimated release date is Tuesday, January 19, 2021, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Add Croatian language translation
Product
survey-library
Type
BreakingChange
Description
Remove question from it's previous parent container before adding into a new one

Right now this code will duplication question1 if it belongs to the first page: js survey.pages[1].addElement(survey.getQuestionByName("question1")); We should remove it from the previous parent container before adding to the new one.

On using "choicesByUrl" property when choices are loaded from the web service, we reset the value to "undefined" before setting the value from choices. It requires to notify UI about value change, otherwise UI elements doesn't know that they need to update their value. In early versions, we took the question value directly from survey. During performance optimizations about a year ago we started to cache the question value in the question object and synchronize question value property and survey data. It means if the previous value exists in new choices, that came from the web service, we don't need to notify survey about question value changing and reset (make undefined and then set the value back) the question value property only. It will be enough to notify UI about the change and update the UI elements accordingly.

Product
survey-library
Type
Bug
Description
question defaultValueExpression doesn't support async functions

The current version executes defaultValueExpression in a non async mode and as result if there are async functions in this expression, then the result will be incorrect.

What is the current behavior?

How would you reproduce the current behavior (if this is a bug)?

  1. go to https://9yhjm.csb.app/
  2. click nextpage button, goto 2nd page.
  3. click prevpage, click does not work any more.

image

PrevPage button does not work.

What is the expected behavior?

prevPage button should work.

Provide the test code and the tested page URL (if applicable)

works in 1.8.9 https://codesandbox.io/s/surveyjs-vue-forked-wmuzw?file=/src/components/SurveyComponent.vue fail in 1.8.10 https://codesandbox.io/s/surveyjs-vue-forked-9yhjm

    this.survey = new Survey.Model(json);
    // after version  1.8.9, set locale break navigation 
    // How to reproduce:
    // chose a version after 1.8.9. say 1.8.10.
    // click nextpage button, goto 2 page.
    // then click prevpage, click does not work any more.
    this.survey.locale = "ja";

I tracked the code and find this change might related to this bug.

https://github.com/surveyjs/survey-library/commit/cc67fbfe766fdb8f83c553e305e14aa5b2e26548

Product
survey-creator
Type
Enhancement
Description
Add croation language translation
Product
survey-creator
Type
Enhancement
Description
Sort by text (question/panel/page title) elements in elementSelector widget

We do not currently sort elements and it is hard to select an element if there are a lot of items in a dropdown. We should sort them by displaying text.

Product
survey-analytics
Type
Enhancement
Description
Gauge Customization

need to create an example

based on https://surveyjs.answerdesk.io/ticket/details/T5980

Version: v1.8.25, released at Sunday, January 17, 2021, Total Issue Count: 1

Product Type Description
survey-analytics Enhancement unable to setup Plotly chart options in PlotlyGaugeAdapter

Version: v1.8.25, released at Sunday, January 17, 2021, Total Issue Count: 1

Product
survey-analytics
Type
Enhancement
Description
unable to setup Plotly chart options in PlotlyGaugeAdapter

Version: v1.8.24, released at Wednesday, January 13, 2021, Total Issue Count: 13

Product Type Description
survey-library Bug Composite question doesn't set empty value into editing object

The functionality is required for Creator v2.

survey-library Bug Complete trigger doesn't work on calculated value

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

The complete trigger that ends the survey does not work on calculated values. Interestingly, if I add an expression type question and set that to the value of the calculatedValue, then add the trigger to that expression question it does work as expected.

What is the expected behavior?

It should work on calculated values too.

How would you reproduce the current behavior (if this is a bug)?

Load the JSON below, choose option 1 and see that you can continue to the next page(s) which shouldn't be possible.

Provide the test code and the tested page URL (if applicable)

{
 "title": "survey title",
 "description": "test123 descr",
 "logoWidth": 0,
 "focusFirstQuestionAutomatic": false,
 "completedHtmlOnCondition": [
  {
   "expression": "{result} = 'screenout'",
   "html": "result trigger!!!"
  }
 ],
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "expression",
     "name": "expr",
     "title": "This expression contains the result variable, which is a calculatedValue",
     "expression": "{result}"
    },
    {
     "type": "html",
     "name": "question2",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "html",
     "name": "question7",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "html",
     "name": "question3",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "complete",
   "expression": "{result} = 'screenout'"
  }
 ],
 "calculatedValues": [
  {
   "name": "result",
   "expression": "iif({question1} = 'item1', 'screenout', 'complete')",
   "includeIntoResult": true
  }
 ],
 "showPageNumbers": true
}

Tested page URL: https://surveyjs.io/create-survey

survey-library Enhancement Feature Request: Add support for datalist

Are you requesting a feature, reporting a bug or asking a question?

Feature request

What is the current behavior?

There isn't a way to search the choices of the dropdown list. datalist supports this

survey-library Bug Triggers referencing question names with dot not working. Second Example

There is still an issue with dots in triggers. A slightly different example to the above is not working correctly:

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question.name1",
     "choices": [
      "item1",
      "item2",
      "item3",
      "item4"
     ]
    },
    {
     "type": "text",
     "name": "question.name2"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "expression": "{question.name1} anyof ['item1', 'item2']",
   "setToName": "question.name2",
   "setValue": "one"
  },
  {
   "type": "setvalue",
   "expression": "{question.name1} anyof ['item3', 'item4']",
   "setToName": "question.name2",
   "setValue": "two"
  }
 ]
}

Originally posted by @dasboe in https://github.com/surveyjs/survey-library/issues/2420#issuecomment-753942148

survey-library Bug Maximum stack size exceeded error with some JSON with progressBarType equals to "buttons"

The following JSON will generate the error:

{
      elements: [
        {
          type: "boolean",
          name: "q1",
        },
        {
          type: "matrixdynamic",
          name: "q2",
          columns: [
            {
              name: "q3",
              visibleIf: "{q1} = true",
            },
          ],
          rowCount: 1,
        },
      ],
      progressBarType: "buttons",
    }

The origional error was reported in SurveyJS support desk

survey-library Bug ImagePicker question can includes otherItem if it contains in JSON and it generates JavaScript error

The original issue was created in SurveyJS support desk. Converting "radiogroup" question with hasOther property set to true to "imagepicker" generates JavaScript error. The reason that image picker contains a wrong item type - "other item". Imagepicker should have it at the first place.

survey-library Bug Changing properties in CalculatedValue object doesn't call survey.onPropertyValueChangedCallback function

Since changing properties in CalculatedValue object doesn't call survey.onPropertyValueChangedCallback function, creator.onMofied event doesn't call eigther. The original issue was reported into SurveyJS Support Desk.

survey-library Enhancement Support editing question text dataList property in Survey

The functionality is required for Creator V2. We use Survey as property grid to edit Survey objects.

survey-library BreakingChange render step attribute in text question by default as "any"

We decided to render the step attribute as "any" by default. Let us know if you feel that is not a correct decision, we will introduce a new setting that you will allow you to get the old behavior. You can read more about html step attribute here.

survey-creator Enhancement Strings property editor, string[]

We required this property editor for text question dataList property - the list of localizable strings.

survey-creator Bug Changing question name in Modal window doesn't update expressions (visibleIf/enableIf...)

Are you requesting a feature, reporting a bug or ask a question?

Bug

What is the current behavior?

When i have the property grid disabled, when we edit a question , its opens a modal with the information of question , if we rename a question inside of this modal , dont have the same behavior (my visibleifs of all my questions are not renamed) Example question 1 question 2 visbleif : = OUI question 3 /////////////////////////// AFTER RENAME food_enviroment_available question 2 visbleif : = OUI question 3

What is the expected behavior?

Independent for a property grid, being active or not(modal) , its must works on same way Example : question 1 question 2 visbleif : = OUI question 3 /////////////////////////// AFTER RENAME food_enviroment_available question 2 visbleif : = OUI question 3

How would you reproduce the current behavior (if this is a bug)?

If you create questions and set on any question a visible if that depends from another, and do the rename, this events never happens

Specify your

  • browser:chrome
  • editor version:last (i test on your site also)
survey-creator Enhancement Allow to validate editing logic item in "Logic tab"

The following event was added into logic object:

  /**
   * The event is called before logic item is saved. You can set options.error to non empty string to show error instead of saving the item.
   * You can use options.item.actions to access actions and optionally set errorText to a particular action.
   * <br/> options.item is the saved logic item.
   * <br/> usedNamesInExpression - the string list of all variables (questions, calculatedValues, and so on) that are used in expression
   * <br/> error - the error string. It is empty by default. You have to set it to non-empty string to show the error on saving.
   */
  public onLogicItemValidation: Survey.Event< (sender: SurveyLogic, options: any) => any,  any>

Here is the example of using:

      creator.logic.onLogicItemValidation.add((_, options) => {
       let actions = options.item.actions;
        for (let i = 0; i < actions.length; i++) {
          let action = actions[i];
          if (action.logicTypeName === "question_visibility" && !!action.element) {
            if (options.usedNamesInExpression.indexOf(action.element.name) > -1) {
              action.errorText = "Please use another question";
              options.error = "There is an error in an action";
            }
          }
        }
      });
survey-creator Bug Width style is applying to input under data section as well and its not needed

Version: v1.8.24, released at Wednesday, January 13, 2021, Total Issue Count: 13

Product
survey-library
Type
Bug
Description
Composite question doesn't set empty value into editing object

The functionality is required for Creator v2.

Product
survey-library
Type
Bug
Description
Complete trigger doesn't work on calculated value

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

The complete trigger that ends the survey does not work on calculated values. Interestingly, if I add an expression type question and set that to the value of the calculatedValue, then add the trigger to that expression question it does work as expected.

What is the expected behavior?

It should work on calculated values too.

How would you reproduce the current behavior (if this is a bug)?

Load the JSON below, choose option 1 and see that you can continue to the next page(s) which shouldn't be possible.

Provide the test code and the tested page URL (if applicable)

{
 "title": "survey title",
 "description": "test123 descr",
 "logoWidth": 0,
 "focusFirstQuestionAutomatic": false,
 "completedHtmlOnCondition": [
  {
   "expression": "{result} = 'screenout'",
   "html": "result trigger!!!"
  }
 ],
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "expression",
     "name": "expr",
     "title": "This expression contains the result variable, which is a calculatedValue",
     "expression": "{result}"
    },
    {
     "type": "html",
     "name": "question2",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "html",
     "name": "question7",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "html",
     "name": "question3",
     "html": "This is the value of the result calculated value:\n{result}\n\nThis is the value of the expression:\n{expr}"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "complete",
   "expression": "{result} = 'screenout'"
  }
 ],
 "calculatedValues": [
  {
   "name": "result",
   "expression": "iif({question1} = 'item1', 'screenout', 'complete')",
   "includeIntoResult": true
  }
 ],
 "showPageNumbers": true
}

Tested page URL: https://surveyjs.io/create-survey

Product
survey-library
Type
Enhancement
Description
Feature Request: Add support for datalist

Are you requesting a feature, reporting a bug or asking a question?

Feature request

What is the current behavior?

There isn't a way to search the choices of the dropdown list. datalist supports this

There is still an issue with dots in triggers. A slightly different example to the above is not working correctly:

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question.name1",
     "choices": [
      "item1",
      "item2",
      "item3",
      "item4"
     ]
    },
    {
     "type": "text",
     "name": "question.name2"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "expression": "{question.name1} anyof ['item1', 'item2']",
   "setToName": "question.name2",
   "setValue": "one"
  },
  {
   "type": "setvalue",
   "expression": "{question.name1} anyof ['item3', 'item4']",
   "setToName": "question.name2",
   "setValue": "two"
  }
 ]
}

Originally posted by @dasboe in https://github.com/surveyjs/survey-library/issues/2420#issuecomment-753942148

The following JSON will generate the error:

{
      elements: [
        {
          type: "boolean",
          name: "q1",
        },
        {
          type: "matrixdynamic",
          name: "q2",
          columns: [
            {
              name: "q3",
              visibleIf: "{q1} = true",
            },
          ],
          rowCount: 1,
        },
      ],
      progressBarType: "buttons",
    }

The origional error was reported in SurveyJS support desk

The original issue was created in SurveyJS support desk. Converting "radiogroup" question with hasOther property set to true to "imagepicker" generates JavaScript error. The reason that image picker contains a wrong item type - "other item". Imagepicker should have it at the first place.

Since changing properties in CalculatedValue object doesn't call survey.onPropertyValueChangedCallback function, creator.onMofied event doesn't call eigther. The original issue was reported into SurveyJS Support Desk.

Product
survey-library
Type
Enhancement
Description
Support editing question text dataList property in Survey

The functionality is required for Creator V2. We use Survey as property grid to edit Survey objects.

Product
survey-library
Type
BreakingChange
Description
render step attribute in text question by default as "any"

We decided to render the step attribute as "any" by default. Let us know if you feel that is not a correct decision, we will introduce a new setting that you will allow you to get the old behavior. You can read more about html step attribute here.

Product
survey-creator
Type
Enhancement
Description
Strings property editor, string[]

We required this property editor for text question dataList property - the list of localizable strings.

Are you requesting a feature, reporting a bug or ask a question?

Bug

What is the current behavior?

When i have the property grid disabled, when we edit a question , its opens a modal with the information of question , if we rename a question inside of this modal , dont have the same behavior (my visibleifs of all my questions are not renamed) Example question 1 question 2 visbleif : = OUI question 3 /////////////////////////// AFTER RENAME food_enviroment_available question 2 visbleif : = OUI question 3

What is the expected behavior?

Independent for a property grid, being active or not(modal) , its must works on same way Example : question 1 question 2 visbleif : = OUI question 3 /////////////////////////// AFTER RENAME food_enviroment_available question 2 visbleif : = OUI question 3

How would you reproduce the current behavior (if this is a bug)?

If you create questions and set on any question a visible if that depends from another, and do the rename, this events never happens

Specify your

  • browser:chrome
  • editor version:last (i test on your site also)
Product
survey-creator
Type
Enhancement
Description
Allow to validate editing logic item in "Logic tab"

The following event was added into logic object:

  /**
   * The event is called before logic item is saved. You can set options.error to non empty string to show error instead of saving the item.
   * You can use options.item.actions to access actions and optionally set errorText to a particular action.
   * <br/> options.item is the saved logic item.
   * <br/> usedNamesInExpression - the string list of all variables (questions, calculatedValues, and so on) that are used in expression
   * <br/> error - the error string. It is empty by default. You have to set it to non-empty string to show the error on saving.
   */
  public onLogicItemValidation: Survey.Event< (sender: SurveyLogic, options: any) => any,  any>

Here is the example of using:

      creator.logic.onLogicItemValidation.add((_, options) => {
       let actions = options.item.actions;
        for (let i = 0; i < actions.length; i++) {
          let action = actions[i];
          if (action.logicTypeName === "question_visibility" && !!action.element) {
            if (options.usedNamesInExpression.indexOf(action.element.name) > -1) {
              action.errorText = "Please use another question";
              options.error = "There is an error in an action";
            }
          }
        }
      });

Version: v1.8.23, released at Tuesday, December 29, 2020, Total Issue Count: 6

Product Type Description
survey-library Bug Ignore logoWidth if logo is empty

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

The survey title gets a style like this: max-width: calc(((100% - 5px) - 2em) - 300px); This (as expected), doesn't work very well with small display sizes, think a survey container of 500px wide...

What is the expected behavior?

I assume that this calculation was added so that the survey title doesn't overlap the logo. I'd expect if no logo was specified (which is the default) then the logoWidth gets ignored and title is allowed to span the whole width.

How would you reproduce the current behavior (if this is a bug)?

Workaround

Explicitly setting the logo width to 0 makes it work as expected...

survey-library Enhancement Themes: add $text-input-color variable

This allows to customize input controls the following way:

  var defaultThemeColorsSurvey = Survey.StylesManager.ThemeColors["modern"];
  defaultThemeColorsSurvey["$text-input-color"] = "blue";
  defaultThemeColorsSurvey["$inputs-background-color"] = "yellow";
  Survey.StylesManager.applyTheme("modern");

See the https://surveyjs.answerdesk.io/ticket/details/t5984/how-to-modify-input-text-colour-in-custom-theme thread for more details

survey-library Enhancement Get all variable names in the survey

New function that returns all variables in the survey. Variables are not stored in the survey.data

  /**
   * Returns all variables in the survey. Use setVariable function to create a new variable.
   * @see getVariable
   * @see setVariable
   */
  public getVariableNames(): Array<string>;
survey-library Enhancement Allow to use choices from another question and optionally fiter them by selected/unselected items

The common task is to show is to filter choices from previous question by showing selected/unselected items. We allow to do it by using setting choicesVisibleIf property to: " contains " and setting the same choices in two, or more questions. Here is the example. There are two issues with this approach:

  1. End-user has to duplicate choices and he/she may forget to modify choices in all questions later.
  2. It requires to teach end-users how to set-up choicesVisibleIf property. In general it gives more flexibility, but the most users have problems to follow this step. Solution is to add two properties into "checkbox", "radiogroup" and "dropdown" questions:
  /**
   * Set this property to get choices from the question you have selected except defining them in this question. It will allow to avoid duplication in your survey definition.
   * By setting this property, "choices", "choicesVisibleIf", "choicesEnableIf" and "choicesOrder" properties become invisible, since they are defined in another question.
   * You can set `choicesFromQuestionMode` property to filter choices from another question.
   * @see choices
   * @see choicesFromQuestionMode
   */
  public get choicesFromQuestion(): string;

  /**
   * The property becomes visible when `choicesFromQuestion` property is selected. The default value is "all" and all visible choices from another question are show as it is.
   * You can set this property to "selected" or "unselected" to show only selected choices from the previous question or unselected.
   * @see choicesFromQuestion
   */
  public get choicesFromQuestionMode(): string;

As result your JSON instead of this one becomes following:

{
    elements: [
        {
            type: "checkbox",
            name: "car",
            title: "What cars have you being drived?",
            choices: [
                "Ford",
                "Vauxhall",
                "Volkswagen",
                "Nissan",
                "Audi",
                "Mercedes-Benz",
                "BMW",
                "Peugeot",
                "Toyota",
                "Citroen",
                "Tesla"
            ]
        }, {
            "type": "radiogroup",
            "name": "bestcar",
            "title": "What car did you enjoy the most?",
            "choicesFromQuestion": "car",
            "choicesFromQuestionMode": "selected"
        }, {
            "type": "radiogroup",
            "name": "secondcar",
            "visibleIf": "{car.length} > 1",
            "title": "What car is your second choice?",
            "choicesFromQuestion": "bestcar",
            "choicesFromQuestionMode": "unselected"
        }
    ]
}
survey-library Bug Add support for nested question in Logic UI for composite components

We show composite component as one question in Logic UI. However, it doesn't make sense, since composite component is a container for other questions and we have to create expressions with nested questions in composite component.

survey-creator Enhancement Support base select question choicesFromQuestion property

Add a new property editor - select question inherited from selectbase: "checkbox", "dropdown" and "radiogroup" and turn off/on choices adorners on setting/unsetting choicesFromQuestion property. Please read here more about the functionality.

Version: v1.8.23, released at Tuesday, December 29, 2020, Total Issue Count: 6

Product
survey-library
Type
Bug
Description
Ignore logoWidth if logo is empty

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

The survey title gets a style like this: max-width: calc(((100% - 5px) - 2em) - 300px); This (as expected), doesn't work very well with small display sizes, think a survey container of 500px wide...

What is the expected behavior?

I assume that this calculation was added so that the survey title doesn't overlap the logo. I'd expect if no logo was specified (which is the default) then the logoWidth gets ignored and title is allowed to span the whole width.

How would you reproduce the current behavior (if this is a bug)?

Workaround

Explicitly setting the logo width to 0 makes it work as expected...

Product
survey-library
Type
Enhancement
Description
Themes: add $text-input-color variable

This allows to customize input controls the following way:

  var defaultThemeColorsSurvey = Survey.StylesManager.ThemeColors["modern"];
  defaultThemeColorsSurvey["$text-input-color"] = "blue";
  defaultThemeColorsSurvey["$inputs-background-color"] = "yellow";
  Survey.StylesManager.applyTheme("modern");

See the https://surveyjs.answerdesk.io/ticket/details/t5984/how-to-modify-input-text-colour-in-custom-theme thread for more details

Product
survey-library
Type
Enhancement
Description
Get all variable names in the survey

New function that returns all variables in the survey. Variables are not stored in the survey.data

  /**
   * Returns all variables in the survey. Use setVariable function to create a new variable.
   * @see getVariable
   * @see setVariable
   */
  public getVariableNames(): Array<string>;

The common task is to show is to filter choices from previous question by showing selected/unselected items. We allow to do it by using setting choicesVisibleIf property to: " contains " and setting the same choices in two, or more questions. Here is the example. There are two issues with this approach:

  1. End-user has to duplicate choices and he/she may forget to modify choices in all questions later.
  2. It requires to teach end-users how to set-up choicesVisibleIf property. In general it gives more flexibility, but the most users have problems to follow this step. Solution is to add two properties into "checkbox", "radiogroup" and "dropdown" questions:
  /**
   * Set this property to get choices from the question you have selected except defining them in this question. It will allow to avoid duplication in your survey definition.
   * By setting this property, "choices", "choicesVisibleIf", "choicesEnableIf" and "choicesOrder" properties become invisible, since they are defined in another question.
   * You can set `choicesFromQuestionMode` property to filter choices from another question.
   * @see choices
   * @see choicesFromQuestionMode
   */
  public get choicesFromQuestion(): string;

  /**
   * The property becomes visible when `choicesFromQuestion` property is selected. The default value is "all" and all visible choices from another question are show as it is.
   * You can set this property to "selected" or "unselected" to show only selected choices from the previous question or unselected.
   * @see choicesFromQuestion
   */
  public get choicesFromQuestionMode(): string;

As result your JSON instead of this one becomes following:

{
    elements: [
        {
            type: "checkbox",
            name: "car",
            title: "What cars have you being drived?",
            choices: [
                "Ford",
                "Vauxhall",
                "Volkswagen",
                "Nissan",
                "Audi",
                "Mercedes-Benz",
                "BMW",
                "Peugeot",
                "Toyota",
                "Citroen",
                "Tesla"
            ]
        }, {
            "type": "radiogroup",
            "name": "bestcar",
            "title": "What car did you enjoy the most?",
            "choicesFromQuestion": "car",
            "choicesFromQuestionMode": "selected"
        }, {
            "type": "radiogroup",
            "name": "secondcar",
            "visibleIf": "{car.length} > 1",
            "title": "What car is your second choice?",
            "choicesFromQuestion": "bestcar",
            "choicesFromQuestionMode": "unselected"
        }
    ]
}
Product
survey-library
Type
Bug
Description
Add support for nested question in Logic UI for composite components

We show composite component as one question in Logic UI. However, it doesn't make sense, since composite component is a container for other questions and we have to create expressions with nested questions in composite component.

Product
survey-creator
Type
Enhancement
Description
Support base select question choicesFromQuestion property

Add a new property editor - select question inherited from selectbase: "checkbox", "dropdown" and "radiogroup" and turn off/on choices adorners on setting/unsetting choicesFromQuestion property. Please read here more about the functionality.

Version: v1.8.22, released at Thursday, December 24, 2020, Total Issue Count: 7

Product Type Description
survey-library Bug Radio in matrix not working with true and false values

Are you requesting a feature, reporting a bug or asking a question?

bug

What is the current behavior?

I cannot use value true/false values in matrix columns while I can do it in radiogroup. When choosing one or the other in matrix and look at the console you'll see why: strings "true" and "false" are stored ...

https://plnkr.co/edit/JeAJNJuJ1PAlyT1O

thank you

survey-library Enhancement Add onValueChanged function for component

onValueChanged function will allow to avoid using question.valueChangedCallback callback. Here is the small example:

Survey.ComponentCollection.Instance.add({
    name: "dropdown_and_text",
    elementsJSON: [
      {
        type: "dropdown",
        name: "combo",
        choices: ["A", "B", "C"],
      },
      { type: "text", name: "text1" },
      { type: "text", name: "text2" },
    ],
    onValueChanged: (question, name, value) => {
     //If combo is changed, then set a double value of "combo" to "text1" and clear "text2"
      if (name == "combo") {
        question.setValue("text1", value + value);
        question.setValue("text2", null);
      }
    },
  });
survey-library Enhancement Allow to add/remove supported validators for questions

In the current version v1.8.21 and low, SurveyJS Library have hard-coded validors for different question types. For example comment support: "expression", "text" and "regex" validator types. There is no way to delete or add new validator type for any question type. From v1.8.22, we are adding into Survey settings the following variable:

  supportedValidators: {
    question: ["expression"],
    comment: ["text", "regex"],
    text: ["numeric", "text", "regex", "email"],
    checkbox: ["answercount"],
  },

For example to remove "regex" validator for "comment" you will need to write:

Survey.settings.supportedValidators.comment = ["text"];
survey-library Enhancement New survey checkErrorsMode, onValueChanging

We have a popular onValueChanged check error mode, when a user can see an error on changing the value and not on click "Next"/"Complete" buttons, the default behavior. onValueChanging is similar to onValueChanged, except one big difference. If the value is incorrect, there is an error, then value will not set into survey data. It means that survey data will not contains data with validation errors. In this mode, you should be aware that question.value and survey.getValue("questionName") can be different, if the question value is not valid. question.value contains value entered by end-user.

survey-library Bug Stack overflow on using component in Panel Dynamic

Stack overflow error happens on using single question component in panel dynamic. The following code will produce the error.

  ComponentCollection.Instance.add({
    name: "singlequestion",
    createQuestion: function () {
      var res = new QuestionDropdownModel("question");
      res.choices = [1, 2, 3, 4, 5];
      return res;
    },
  });
  var survey = new SurveyModel({
    elements: [
      {
        type: "paneldynamic",
        name: "q1",
        templateElements: [
          { type: "text", name: "q1" },
          { type: "singlequestion", name: "q2" },
        ],
      },
    ],
  });
  var panel = <QuestionPanelDynamicModel>survey.getAllQuestions()[0];
  panel.panelCount = 1;
survey-library Bug Key chatter in safari when textUpdateMode is onTyping

The issue is related to multibyte symbols input, e.g. Japanese

See the https://surveyjs.answerdesk.io/ticket/details/t5934/key-chatter-in-safari-when-textupdatemode-is-ontyping thread for more details

survey-creator Enhancement Make possible to disable description adorner for survey/page descriptions
SurveyCreator.descriptionAdorner.surveyDescriptionEditable = false;
SurveyCreator.descriptionAdorner.pageDescriptionEditable = false;

Version: v1.8.22, released at Thursday, December 24, 2020, Total Issue Count: 7

Product
survey-library
Type
Bug
Description
Radio in matrix not working with true and false values

Are you requesting a feature, reporting a bug or asking a question?

bug

What is the current behavior?

I cannot use value true/false values in matrix columns while I can do it in radiogroup. When choosing one or the other in matrix and look at the console you'll see why: strings "true" and "false" are stored ...

https://plnkr.co/edit/JeAJNJuJ1PAlyT1O

thank you

Product
survey-library
Type
Enhancement
Description
Add onValueChanged function for component

onValueChanged function will allow to avoid using question.valueChangedCallback callback. Here is the small example:

Survey.ComponentCollection.Instance.add({
    name: "dropdown_and_text",
    elementsJSON: [
      {
        type: "dropdown",
        name: "combo",
        choices: ["A", "B", "C"],
      },
      { type: "text", name: "text1" },
      { type: "text", name: "text2" },
    ],
    onValueChanged: (question, name, value) => {
     //If combo is changed, then set a double value of "combo" to "text1" and clear "text2"
      if (name == "combo") {
        question.setValue("text1", value + value);
        question.setValue("text2", null);
      }
    },
  });
Product
survey-library
Type
Enhancement
Description
Allow to add/remove supported validators for questions

In the current version v1.8.21 and low, SurveyJS Library have hard-coded validors for different question types. For example comment support: "expression", "text" and "regex" validator types. There is no way to delete or add new validator type for any question type. From v1.8.22, we are adding into Survey settings the following variable:

  supportedValidators: {
    question: ["expression"],
    comment: ["text", "regex"],
    text: ["numeric", "text", "regex", "email"],
    checkbox: ["answercount"],
  },

For example to remove "regex" validator for "comment" you will need to write:

Survey.settings.supportedValidators.comment = ["text"];
Product
survey-library
Type
Enhancement
Description
New survey checkErrorsMode, onValueChanging

We have a popular onValueChanged check error mode, when a user can see an error on changing the value and not on click "Next"/"Complete" buttons, the default behavior. onValueChanging is similar to onValueChanged, except one big difference. If the value is incorrect, there is an error, then value will not set into survey data. It means that survey data will not contains data with validation errors. In this mode, you should be aware that question.value and survey.getValue("questionName") can be different, if the question value is not valid. question.value contains value entered by end-user.

Product
survey-library
Type
Bug
Description
Stack overflow on using component in Panel Dynamic

Stack overflow error happens on using single question component in panel dynamic. The following code will produce the error.

  ComponentCollection.Instance.add({
    name: "singlequestion",
    createQuestion: function () {
      var res = new QuestionDropdownModel("question");
      res.choices = [1, 2, 3, 4, 5];
      return res;
    },
  });
  var survey = new SurveyModel({
    elements: [
      {
        type: "paneldynamic",
        name: "q1",
        templateElements: [
          { type: "text", name: "q1" },
          { type: "singlequestion", name: "q2" },
        ],
      },
    ],
  });
  var panel = <QuestionPanelDynamicModel>survey.getAllQuestions()[0];
  panel.panelCount = 1;
Product
survey-library
Type
Bug
Description
Key chatter in safari when textUpdateMode is onTyping

The issue is related to multibyte symbols input, e.g. Japanese

See the https://surveyjs.answerdesk.io/ticket/details/t5934/key-chatter-in-safari-when-textupdatemode-is-ontyping thread for more details

Product
survey-creator
Type
Enhancement
Description
Make possible to disable description adorner for survey/page descriptions
SurveyCreator.descriptionAdorner.surveyDescriptionEditable = false;
SurveyCreator.descriptionAdorner.pageDescriptionEditable = false;

Version: v1.8.21, released at Tuesday, December 15, 2020, Total Issue Count: 8

Product Type Description
survey-library Bug Progress bar during preview is showing "Page 1 of 1".

Are you requesting a feature, reporting a bug or asking a question?

Maybe a bug

What is the current behavior?

When using the "showPreviewBeforeComplete": "showAllQuestions", the progress bar is being displayed and says: Page 1 of 1. Is there a way to hide the progress bar during the display of the preview page?

What is the expected behavior?

Not see the progress bar during preview because the preview page is a single page and it doesn't make sense.

How would you reproduce the current behavior (if this is a bug)?

I provided test code below.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "matrix",
     "name": "Quality",
     "title": "Please indicate if you agree or disagree with the following statements",
     "columns": [
      {
       "value": 1,
       "text": "Strongly Disagree"
      },
      {
       "value": 2,
       "text": "Disagree"
      },
      {
       "value": 3,
       "text": "Neutral"
      },
      {
       "value": 4,
       "text": "Agree"
      },
      {
       "value": 5,
       "text": "Strongly Agree"
      }
     ],
     "rows": [
      {
       "value": "affordable",
       "text": "Product is affordable"
      },
      {
       "value": "does what it claims",
       "text": "Product does what it claims"
      },
      {
       "value": "better then others",
       "text": "Product is better than other products on the market"
      },
      {
       "value": "easy to use",
       "text": "Product is easy to use"
      }
     ]
    },
    {
     "type": "rating",
     "name": "satisfaction",
     "title": "How satisfied are you with the Product?",
     "isRequired": true,
     "minRateDescription": "Not Satisfied",
     "maxRateDescription": "Completely satisfied"
    },
    {
     "type": "rating",
     "name": "recommend friends",
     "visibleIf": "{satisfaction} > 3",
     "title": "How likely are you to recommend the Product to a friend or co-worker?",
     "minRateDescription": "Will not recommend",
     "maxRateDescription": "I will recommend"
    },
    {
     "type": "comment",
     "name": "suggestions",
     "title": "What would make you more satisfied with the Product?"
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "radiogroup",
     "name": "price to competitors",
     "title": "Compared to our competitors, do you feel the Product is",
     "choices": [
      "Less expensive",
      "Priced about the same",
      "More expensive",
      "Not sure"
     ]
    },
    {
     "type": "radiogroup",
     "name": "price",
     "title": "Do you feel our current price is merited by our product?",
     "choices": [
      {
       "value": "correct",
       "text": "Yes, the price is about right"
      },
      {
       "value": "low",
       "text": "No, the price is too low for your product"
      },
      {
       "value": "high",
       "text": "No, the price is too high for your product"
      }
     ]
    },
    {
     "type": "multipletext",
     "name": "pricelimit",
     "title": "What is the... ",
     "items": [
      {
       "name": "mostamount",
       "title": "Most amount you would every pay for a product like ours"
      },
      {
       "name": "leastamount",
       "title": "The least amount you would feel comfortable paying"
      }
     ]
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "text",
     "name": "email",
     "title": "Thank you for taking our survey. Your survey is almost complete, please enter your email address in the box below if you wish to participate in our drawing, then press the 'Submit' button."
    }
   ]
  }
 ],
 "showQuestionNumbers": "off",
 "showProgressBar": "bottom",
 "clearInvisibleValues": "onHidden",
 "checkErrorsMode": "onValueChanged",
 "showPreviewBeforeComplete": "showAllQuestions"
}

Specify your

  • browser: Any
  • browser version: Any
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.18
survey-library Bug Bug: onValidatedErrorsOnCurrentPage isn't notified of errors set via onServerValidateQuestions

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

The event onValidatedErrorsOnCurrentPage isn't notified of errors set via onServerValidateQuestions.

What is the expected behavior?

The event should be triggered again once options.complete() is called from onServerValidateQuestions.

Provide the test code and the tested page URL (if applicable)

In the example provided, errors: 1 is printed to the console when the field is blank however when an error is set via onServerValidateQuestions, it prints errors: 0 since it runs before the server validation is completed.

Tested page URL: https://plnkr.co/edit/t2HgSyIXfFKBBmIZ

Test code

function surveyValidateQuestion(survey, options) {
    options.errors["country"] = "An exception has occurred.";
    options.complete();
}

function surveyValidateErrorsOnCurrentPage(survey, options) {
    console.log(`errors: ${options.errors.length}`);
}

var json = {
    questions: [
        {
            type: "text",
            name: "country",
            title: "Type a country:",
            isRequired: true
        }
    ]
};

window.survey = new Survey.Model(json);

survey
    .onComplete
    .add(function (result) {
        document
            .querySelector('#surveyResult')
            .textContent = "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });

survey
    .onServerValidateQuestions
    .add(surveyValidateQuestion);

survey
    .onValidatedErrorsOnCurrentPage
    .add(surveyValidateErrorsOnCurrentPage);

$("#surveyElement").Survey({model: survey});

Specify your

  • browser: Microsoft Edge
  • browser version: 87.0.664.55
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.20
survey-library Enhancement Support titleLocation in matrices

Remove this code for matrices:

  public get isAllowTitleLeft(): boolean {
    return false;
  }
survey-library Bug ProcessValue class doesn't correctly create path for uppercase variables.

The following code doesn't work correctly:

var processor = new Survey.ProcessValue();
var data = {};
processor.setValue(data, "a.Item1.c1", 1);

After that data equals a: {item1: {c1: 1}}, where item1 should be in capital, a: {Item1: {c1: 1}}. This error leads to issue in triggers for matrices question, when rows values are in upper case.

survey-library Enhancement Introduce the "text" property to show in the "alt" image tag attribute
survey-library Enhancement Optionally clear question value on hiding it's container (page or panel).

Add a new option into survey.clearInvisibleValues property.

onHiddenContainer - clear the question value when it or its parent (page or panel) becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing.

It works as onHidden and additional clear value /restore default value on hidding/showing it's container (panel or page).

survey-creator Enhancement Allow do not sort items by name in translation tab.

Currently, questions are sorted by names in translation tab. Some developers want to disable sorting and place they placed on the page. A new setting:

SurveyCreator.settings.traslation.sortByName = false;
custom-widgets Bug Select2: Uncaught TypeError: Cannot read property 'query' of null

See the https://surveyjs.answerdesk.io/ticket/details/t5904/select2-clear-in-matrix-with-visibleif-rule-issue thread for more details Plunker to reproduce: https://plnkr.co/edit/K452qnYAVVdJhQvs?preview

select2.min.js:1 Uncaught TypeError: Cannot read property 'query' of null at e. (select2.min.js:1) at e.d.invoke (select2.min.js:1) at e.d.trigger (select2.min.js:1) at e.trigger (select2.min.js:1) at e.open (select2.min.js:1) at e.toggleDropdown (select2.min.js:1) at d. (select2.min.js:1) at d.invoke (select2.min.js:1) at d.trigger (select2.min.js:1) at d.c._handleClear (select2.min.js:1) (anonymous) @ select2.min.js:1 d.invoke @ select2.min.js:1 d.trigger @ select2.min.js:1 e.trigger @ select2.min.js:1 e.open @ select2.min.js:1 e.toggleDropdown @ select2.min.js:1 (anonymous) @ select2.min.js:1 d.invoke @ select2.min.js:1 d.trigger @ select2.min.js:1 c._handleClear @ select2.min.js:1 j @ select2.min.js:1 (anonymous) @ select2.min.js:1 dispatch @ jquery:5429 elemData.handle @ jquery:5233

Version: v1.8.21, released at Tuesday, December 15, 2020, Total Issue Count: 8

Product
survey-library
Type
Bug
Description
Progress bar during preview is showing "Page 1 of 1".

Are you requesting a feature, reporting a bug or asking a question?

Maybe a bug

What is the current behavior?

When using the "showPreviewBeforeComplete": "showAllQuestions", the progress bar is being displayed and says: Page 1 of 1. Is there a way to hide the progress bar during the display of the preview page?

What is the expected behavior?

Not see the progress bar during preview because the preview page is a single page and it doesn't make sense.

How would you reproduce the current behavior (if this is a bug)?

I provided test code below.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "matrix",
     "name": "Quality",
     "title": "Please indicate if you agree or disagree with the following statements",
     "columns": [
      {
       "value": 1,
       "text": "Strongly Disagree"
      },
      {
       "value": 2,
       "text": "Disagree"
      },
      {
       "value": 3,
       "text": "Neutral"
      },
      {
       "value": 4,
       "text": "Agree"
      },
      {
       "value": 5,
       "text": "Strongly Agree"
      }
     ],
     "rows": [
      {
       "value": "affordable",
       "text": "Product is affordable"
      },
      {
       "value": "does what it claims",
       "text": "Product does what it claims"
      },
      {
       "value": "better then others",
       "text": "Product is better than other products on the market"
      },
      {
       "value": "easy to use",
       "text": "Product is easy to use"
      }
     ]
    },
    {
     "type": "rating",
     "name": "satisfaction",
     "title": "How satisfied are you with the Product?",
     "isRequired": true,
     "minRateDescription": "Not Satisfied",
     "maxRateDescription": "Completely satisfied"
    },
    {
     "type": "rating",
     "name": "recommend friends",
     "visibleIf": "{satisfaction} > 3",
     "title": "How likely are you to recommend the Product to a friend or co-worker?",
     "minRateDescription": "Will not recommend",
     "maxRateDescription": "I will recommend"
    },
    {
     "type": "comment",
     "name": "suggestions",
     "title": "What would make you more satisfied with the Product?"
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "radiogroup",
     "name": "price to competitors",
     "title": "Compared to our competitors, do you feel the Product is",
     "choices": [
      "Less expensive",
      "Priced about the same",
      "More expensive",
      "Not sure"
     ]
    },
    {
     "type": "radiogroup",
     "name": "price",
     "title": "Do you feel our current price is merited by our product?",
     "choices": [
      {
       "value": "correct",
       "text": "Yes, the price is about right"
      },
      {
       "value": "low",
       "text": "No, the price is too low for your product"
      },
      {
       "value": "high",
       "text": "No, the price is too high for your product"
      }
     ]
    },
    {
     "type": "multipletext",
     "name": "pricelimit",
     "title": "What is the... ",
     "items": [
      {
       "name": "mostamount",
       "title": "Most amount you would every pay for a product like ours"
      },
      {
       "name": "leastamount",
       "title": "The least amount you would feel comfortable paying"
      }
     ]
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "text",
     "name": "email",
     "title": "Thank you for taking our survey. Your survey is almost complete, please enter your email address in the box below if you wish to participate in our drawing, then press the 'Submit' button."
    }
   ]
  }
 ],
 "showQuestionNumbers": "off",
 "showProgressBar": "bottom",
 "clearInvisibleValues": "onHidden",
 "checkErrorsMode": "onValueChanged",
 "showPreviewBeforeComplete": "showAllQuestions"
}

Specify your

  • browser: Any
  • browser version: Any
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.18

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

The event onValidatedErrorsOnCurrentPage isn't notified of errors set via onServerValidateQuestions.

What is the expected behavior?

The event should be triggered again once options.complete() is called from onServerValidateQuestions.

Provide the test code and the tested page URL (if applicable)

In the example provided, errors: 1 is printed to the console when the field is blank however when an error is set via onServerValidateQuestions, it prints errors: 0 since it runs before the server validation is completed.

Tested page URL: https://plnkr.co/edit/t2HgSyIXfFKBBmIZ

Test code

function surveyValidateQuestion(survey, options) {
    options.errors["country"] = "An exception has occurred.";
    options.complete();
}

function surveyValidateErrorsOnCurrentPage(survey, options) {
    console.log(`errors: ${options.errors.length}`);
}

var json = {
    questions: [
        {
            type: "text",
            name: "country",
            title: "Type a country:",
            isRequired: true
        }
    ]
};

window.survey = new Survey.Model(json);

survey
    .onComplete
    .add(function (result) {
        document
            .querySelector('#surveyResult')
            .textContent = "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });

survey
    .onServerValidateQuestions
    .add(surveyValidateQuestion);

survey
    .onValidatedErrorsOnCurrentPage
    .add(surveyValidateErrorsOnCurrentPage);

$("#surveyElement").Survey({model: survey});

Specify your

  • browser: Microsoft Edge
  • browser version: 87.0.664.55
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.20
Product
survey-library
Type
Enhancement
Description
Support titleLocation in matrices

Remove this code for matrices:

  public get isAllowTitleLeft(): boolean {
    return false;
  }

The following code doesn't work correctly:

var processor = new Survey.ProcessValue();
var data = {};
processor.setValue(data, "a.Item1.c1", 1);

After that data equals a: {item1: {c1: 1}}, where item1 should be in capital, a: {Item1: {c1: 1}}. This error leads to issue in triggers for matrices question, when rows values are in upper case.

Product
survey-library
Type
Enhancement
Description
Introduce the "text" property to show in the "alt" image tag attribute
Product
survey-library
Type
Enhancement
Description
Optionally clear question value on hiding it's container (page or panel).

Add a new option into survey.clearInvisibleValues property.

onHiddenContainer - clear the question value when it or its parent (page or panel) becomes invisible. If a question has value and it was invisible initially then survey clears the value on completing.

It works as onHidden and additional clear value /restore default value on hidding/showing it's container (panel or page).

Product
survey-creator
Type
Enhancement
Description
Allow do not sort items by name in translation tab.

Currently, questions are sorted by names in translation tab. Some developers want to disable sorting and place they placed on the page. A new setting:

SurveyCreator.settings.traslation.sortByName = false;
Product
custom-widgets
Type
Bug
Description
Select2: Uncaught TypeError: Cannot read property 'query' of null

See the https://surveyjs.answerdesk.io/ticket/details/t5904/select2-clear-in-matrix-with-visibleif-rule-issue thread for more details Plunker to reproduce: https://plnkr.co/edit/K452qnYAVVdJhQvs?preview

select2.min.js:1 Uncaught TypeError: Cannot read property 'query' of null at e. (select2.min.js:1) at e.d.invoke (select2.min.js:1) at e.d.trigger (select2.min.js:1) at e.trigger (select2.min.js:1) at e.open (select2.min.js:1) at e.toggleDropdown (select2.min.js:1) at d. (select2.min.js:1) at d.invoke (select2.min.js:1) at d.trigger (select2.min.js:1) at d.c._handleClear (select2.min.js:1) (anonymous) @ select2.min.js:1 d.invoke @ select2.min.js:1 d.trigger @ select2.min.js:1 e.trigger @ select2.min.js:1 e.open @ select2.min.js:1 e.toggleDropdown @ select2.min.js:1 (anonymous) @ select2.min.js:1 d.invoke @ select2.min.js:1 d.trigger @ select2.min.js:1 c._handleClear @ select2.min.js:1 j @ select2.min.js:1 (anonymous) @ select2.min.js:1 dispatch @ jquery:5429 elemData.handle @ jquery:5233

Version: v1.8.20, released at Thursday, December 10, 2020, Total Issue Count: 5

Product Type Description
survey-library Enhancement Implement collapse/expand functionality for all question types (state prop)

We have the state for the panel: https://surveyjs.io/Documentation/Library?id=panelmodel#state

Need to implement the same for all questions.

Possible values: default , collapsed, expanded

survey-library Enhancement Add survey.getQuestionsByValueName()

We did not have a function that returns all questions by their valueName.

  /**
   * Returns all questions by their valueName. name property is used if valueName property is empty.
   * @param valueName a question name
   * @param caseInsensitive
   * @see getQuestionByName
   * @see getQuestionByValueName
   * @see Question.valueName
   */
  public getQuestionsByValueName(
    valueName: string,
    caseInsensitive: boolean = false
  ): Array<Question>;
survey-creator Bug Wrong embed tab text for the Knockout version
survey-creator Enhancement Pass the index to the addItem to toolbox method

We need an ability to pass index where the toolbox item will be inserted See the https://surveyjs.answerdesk.io/ticket/details/t5857/creator-toolbox-categories-reorder thread for more details

survey-creator Bug Escape single quote in title adorner placeholder

Version: v1.8.20, released at Thursday, December 10, 2020, Total Issue Count: 5

Product
survey-library
Type
Enhancement
Description
Implement collapse/expand functionality for all question types (state prop)

We have the state for the panel: https://surveyjs.io/Documentation/Library?id=panelmodel#state

Need to implement the same for all questions.

Possible values: default , collapsed, expanded

Product
survey-library
Type
Enhancement
Description
Add survey.getQuestionsByValueName()

We did not have a function that returns all questions by their valueName.

  /**
   * Returns all questions by their valueName. name property is used if valueName property is empty.
   * @param valueName a question name
   * @param caseInsensitive
   * @see getQuestionByName
   * @see getQuestionByValueName
   * @see Question.valueName
   */
  public getQuestionsByValueName(
    valueName: string,
    caseInsensitive: boolean = false
  ): Array<Question>;
Product
survey-creator
Type
Bug
Description
Wrong embed tab text for the Knockout version
Product
survey-creator
Type
Enhancement
Description
Pass the index to the addItem to toolbox method

We need an ability to pass index where the toolbox item will be inserted See the https://surveyjs.answerdesk.io/ticket/details/t5857/creator-toolbox-categories-reorder thread for more details

Product
survey-creator
Type
Bug
Description
Escape single quote in title adorner placeholder

Version: v1.8.19, released at Tuesday, December 8, 2020, Total Issue Count: 15

Product Type Description
survey-library Enhancement Add parentQuestion for question

Sometimes it is hard to understand in what context a question is. It can be a standalone question or a cell question in matrix or a question inside dynamic panel. The parentQuestion property solve this problem.

  /**
   * A parent question. It can be a dynamic panel or dynamic/dropdown matrices. If the value is a matrix, it means that question is a cell question.
   * This property is null for a stand alone question.
   */
  public get parentQuestion(): Question;
survey-library Bug Bug: onServerValidateQuestions doesn't get called for the last page when showPreviewBeforeComplete is set

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

onServerValidateQuestions doesn't get called on the last page if showPreviewBeforeComplete is set.

What is the expected behavior?

onServerValidateQuestions should be called on every page.

How would you reproduce the current behavior (if this is a bug)?

Using the test page provided below, you'll noticed that page3 is never printed to the console unless you remove showPreviewBeforeComplete from the survey.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/KBfdqN77mlIFxUGB

Test code

Survey
    .StylesManager
    .applyTheme("modern");

//assign call to onServerValidateQuestions callback
function surveyValidateQuestion(survey, options) {
    console.log(survey.currentPage.name);
    options.complete();
}

var json = {
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "boolean",
     "name": "question1",
     "isRequired": true
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "boolean",
     "name": "question2",
     "isRequired": true
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "boolean",
     "name": "question3",
     "isRequired": true
    }
   ]
  }
 ],
 "showPreviewBeforeComplete": "showAllQuestions"
};

window.survey = new Survey.Model(json);

survey
    .onComplete
    .add(function (result) {
        document
            .querySelector('#surveyResult')
            .textContent = "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });

survey
    .onServerValidateQuestions
    .add(surveyValidateQuestion);
$("#surveyElement").Survey({model: survey});

Specify your

  • browser: Microsoft Edge
  • browser version: 87.0.664.47
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.18
survey-library Enhancement Convert strings values in arrary to numbers in sum/min/max/agv functions

The following expression sum(["1", "2"]) will give "12" when the most users expect it to be 3.

survey-library Bug Text input with date input type shouldn't allow goNextPageAutomatic
survey-library Bug survey.clearIncorrectValues() remove totals matrix values if matrix is in dynamic panel

Dynamic panel removes value as "matrixName-total", since it could not find question with this name. We should check for "-total" post prefix before removing this key from the value.

survey-library Bug survey.onMatrixRowRemoved calls before row is removed

We are calling onMatrixRowRemoved event before the row is actually removed from the matrix. We should call this event after.

survey-library Bug Disable flex grow for one question in a "row" when width property is set for this question

based on https://surveyjs.answerdesk.io/ticket/details/T5744

var json = {
  elements: [
    {
      type: "text",
      name: "question1",
      width: "50%",
    },
  ]
}
survey-library Bug react: checkbox column is editable for readonly matrix if showInMultipleColumns is true

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

Display mode and readOnly modes did not affect the 'matrixdropdown' type

What is the expected behavior?

By using 'display' mode in surveyjs implemented in React web app, I am expecting that all different types (checkboxes, radio buttons, single and multi choice matrix) will be disabled respectively.

How would you reproduce the current behavior (if this is a bug)?

Basically extend the survey json => survey.mode = 'display'; Note that in the surveyjs designer everything seems to be working properly.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/create-survey

Test code

const surveyJSON = {"pages":[{"name":"page1","elements":[{"type":"matrixdropdown","name":"2628","title":"Rate your level of agreement with each of the statements below.","defaultValue":{"1832":{"col1":["7","6"]},"1835":{"col1":["7","6"]},"1836":{"col1":["6","7"]},"1844":{"col1":["7","6"]},"1845":{"col1":["7","6"]}},"readOnly":true,"columns":[{"name":"col1","cellType":"checkbox","showInMultipleColumns":true,"choices":[{"value":"10","text":"Disagree"},{"value":"9","text":"Somewhat Disagree"},{"value":"7","text":"Somewhat Agree"},{"value":"6","text":"Agree"}]}],"rows":[{"value":"1836","text":"I know what job/career I want to do when I finish school."},{"value":"1832","text":"I know how to explore and get information about careers I might be interested in."}]}],"title":"Test"}]}

Specify your

  • browser:
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.7.18
survey-library Enhancement Add "parentPanel" into dynamic panel text pre-processing

Right now, there is no way to access parent dynamic panel from nested dynamic panel for text pre-processing. You can access only elements in your dynamic panel as {panel.questionName}. From v1.8.19, you will be able to set the following text into your question title: {parentPanel.questionName}, where parentPanel is the parent Question. Here is the example.

{
    elements: [
      {
        type: "paneldynamic",
        name: "rootPanel",
        panelCount: 1,
        templateElements: [
          {
            type: "text",
            name: "q1",
            title: "{panel.q2}",
          },
          {
            type: "text",
            name: "q2",
          },
          {
            type: "paneldynamic",
            name: "childPanel",
            panelCount: 1,
            templateElements: [
              {
                type: "text",
                name: "childPanel_q1",
                title: "{parentPanel.q2}", ///the example of using "parentPanel".
              },
            ],
          },
        ],
      },
    ],
  }
survey-library Bug age() function doesn't work correctly

age() function can return a year more, if the bithday is on the next day. The original bug created on SurveyJS Support Desk.

survey-library Bug choicesByUrl generates survey.onPropertyChangedCallback on loading from JSON

On loading elements like this:

  {
            type: "dropdown",
            name: "country",
            title: "Select the country...",
            isRequired: true,
            choicesByUrl: {
                url: "https://restcountries.eu/rest/v2/all",
                valueName: "name"
            }
        }

survey.onPropertyChangedCallback will be raised two times for url and valueName. As result SurveyJS Creator will raise onModified event on setting JSON, however nothing has been changed. We should not raise this event on loading choicesByUrl property.

survey-creator Bug readOnly value set in an onGetPropertyReadOnly event handler does not apply to a question's adorner

When a question property's readOnly value is set in an onGetPropertyReadOnly event handler, the value applies to the property editor within the SurveyJS Creator's Properties Grid, but does not apply to the question's adorner.

Sampe code:

creator
    .onGetPropertyReadOnly
        .add(function (sender, options) {
            if(options.obj.name == "myQuestion" && options.property.name == "isRequired"){
                options.readOnly = "true";
            }
    });

Example: https://plnkr.co/edit/6xvOha1KPUasGKsG

survey-analytics Bug Bar chart axis X labels are cut
custom-widgets Enhancement inputmask - support suffix option

This will allow to set "0,00 $" format, where the " $" is the suffix

See the https://surveyjs.answerdesk.io/ticket/details/t5834/add-inputmask-widget-in-toolbox thread for more details

custom-widgets Bug select2 keeps incorrect value instead of removing it

Version: v1.8.19, released at Tuesday, December 8, 2020, Total Issue Count: 15

Product
survey-library
Type
Enhancement
Description
Add parentQuestion for question

Sometimes it is hard to understand in what context a question is. It can be a standalone question or a cell question in matrix or a question inside dynamic panel. The parentQuestion property solve this problem.

  /**
   * A parent question. It can be a dynamic panel or dynamic/dropdown matrices. If the value is a matrix, it means that question is a cell question.
   * This property is null for a stand alone question.
   */
  public get parentQuestion(): Question;

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

onServerValidateQuestions doesn't get called on the last page if showPreviewBeforeComplete is set.

What is the expected behavior?

onServerValidateQuestions should be called on every page.

How would you reproduce the current behavior (if this is a bug)?

Using the test page provided below, you'll noticed that page3 is never printed to the console unless you remove showPreviewBeforeComplete from the survey.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/KBfdqN77mlIFxUGB

Test code

Survey
    .StylesManager
    .applyTheme("modern");

//assign call to onServerValidateQuestions callback
function surveyValidateQuestion(survey, options) {
    console.log(survey.currentPage.name);
    options.complete();
}

var json = {
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "boolean",
     "name": "question1",
     "isRequired": true
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "boolean",
     "name": "question2",
     "isRequired": true
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "boolean",
     "name": "question3",
     "isRequired": true
    }
   ]
  }
 ],
 "showPreviewBeforeComplete": "showAllQuestions"
};

window.survey = new Survey.Model(json);

survey
    .onComplete
    .add(function (result) {
        document
            .querySelector('#surveyResult')
            .textContent = "Result JSON:\n" + JSON.stringify(result.data, null, 3);
    });

survey
    .onServerValidateQuestions
    .add(surveyValidateQuestion);
$("#surveyElement").Survey({model: survey});

Specify your

  • browser: Microsoft Edge
  • browser version: 87.0.664.47
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.18
Product
survey-library
Type
Enhancement
Description
Convert strings values in arrary to numbers in sum/min/max/agv functions

The following expression sum(["1", "2"]) will give "12" when the most users expect it to be 3.

Dynamic panel removes value as "matrixName-total", since it could not find question with this name. We should check for "-total" post prefix before removing this key from the value.

Product
survey-library
Type
Bug
Description
survey.onMatrixRowRemoved calls before row is removed

We are calling onMatrixRowRemoved event before the row is actually removed from the matrix. We should call this event after.

based on https://surveyjs.answerdesk.io/ticket/details/T5744

var json = {
  elements: [
    {
      type: "text",
      name: "question1",
      width: "50%",
    },
  ]
}

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

Display mode and readOnly modes did not affect the 'matrixdropdown' type

What is the expected behavior?

By using 'display' mode in surveyjs implemented in React web app, I am expecting that all different types (checkboxes, radio buttons, single and multi choice matrix) will be disabled respectively.

How would you reproduce the current behavior (if this is a bug)?

Basically extend the survey json => survey.mode = 'display'; Note that in the surveyjs designer everything seems to be working properly.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/create-survey

Test code

const surveyJSON = {"pages":[{"name":"page1","elements":[{"type":"matrixdropdown","name":"2628","title":"Rate your level of agreement with each of the statements below.","defaultValue":{"1832":{"col1":["7","6"]},"1835":{"col1":["7","6"]},"1836":{"col1":["6","7"]},"1844":{"col1":["7","6"]},"1845":{"col1":["7","6"]}},"readOnly":true,"columns":[{"name":"col1","cellType":"checkbox","showInMultipleColumns":true,"choices":[{"value":"10","text":"Disagree"},{"value":"9","text":"Somewhat Disagree"},{"value":"7","text":"Somewhat Agree"},{"value":"6","text":"Agree"}]}],"rows":[{"value":"1836","text":"I know what job/career I want to do when I finish school."},{"value":"1832","text":"I know how to explore and get information about careers I might be interested in."}]}],"title":"Test"}]}

Specify your

  • browser:
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.7.18
Product
survey-library
Type
Enhancement
Description
Add "parentPanel" into dynamic panel text pre-processing

Right now, there is no way to access parent dynamic panel from nested dynamic panel for text pre-processing. You can access only elements in your dynamic panel as {panel.questionName}. From v1.8.19, you will be able to set the following text into your question title: {parentPanel.questionName}, where parentPanel is the parent Question. Here is the example.

{
    elements: [
      {
        type: "paneldynamic",
        name: "rootPanel",
        panelCount: 1,
        templateElements: [
          {
            type: "text",
            name: "q1",
            title: "{panel.q2}",
          },
          {
            type: "text",
            name: "q2",
          },
          {
            type: "paneldynamic",
            name: "childPanel",
            panelCount: 1,
            templateElements: [
              {
                type: "text",
                name: "childPanel_q1",
                title: "{parentPanel.q2}", ///the example of using "parentPanel".
              },
            ],
          },
        ],
      },
    ],
  }
Product
survey-library
Type
Bug
Description
age() function doesn't work correctly

age() function can return a year more, if the bithday is on the next day. The original bug created on SurveyJS Support Desk.

On loading elements like this:

  {
            type: "dropdown",
            name: "country",
            title: "Select the country...",
            isRequired: true,
            choicesByUrl: {
                url: "https://restcountries.eu/rest/v2/all",
                valueName: "name"
            }
        }

survey.onPropertyChangedCallback will be raised two times for url and valueName. As result SurveyJS Creator will raise onModified event on setting JSON, however nothing has been changed. We should not raise this event on loading choicesByUrl property.

When a question property's readOnly value is set in an onGetPropertyReadOnly event handler, the value applies to the property editor within the SurveyJS Creator's Properties Grid, but does not apply to the question's adorner.

Sampe code:

creator
    .onGetPropertyReadOnly
        .add(function (sender, options) {
            if(options.obj.name == "myQuestion" && options.property.name == "isRequired"){
                options.readOnly = "true";
            }
    });

Example: https://plnkr.co/edit/6xvOha1KPUasGKsG

Product
survey-analytics
Type
Bug
Description
Bar chart axis X labels are cut
Product
custom-widgets
Type
Enhancement
Description
inputmask - support suffix option

This will allow to set "0,00 $" format, where the " $" is the suffix

See the https://surveyjs.answerdesk.io/ticket/details/t5834/add-inputmask-widget-in-toolbox thread for more details

Product
custom-widgets
Type
Bug
Description
select2 keeps incorrect value instead of removing it

Version: v1.8.18, released at Tuesday, December 1, 2020, Total Issue Count: 8

Product Type Description
survey-library Enhancement Pass localizable string property name in the `onTextMarkdown` event options

This will allow to apply markdown selectively, e.g. for titles only

See the https://surveyjs.answerdesk.io/ticket/details/t5676/and-how-can-i-check-for-individual-keyup-on-every-other-text-fields-the-context-is thread for more details

survey-library Enhancement Refactor text preprocessing in panel dynamic/matrix dynamic and composite component

We have a code duplication it these three classes for text preprocessing. It should be removed.

survey-library Bug content panel in composite component has underfined renderWidth

renderWidth in contentPanel in composite component should have "100%" value.

survey-library Bug React SurveyQuestionMultipleText Missing Unique "key" prop

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

When running react in dev mode you see the following error:

Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `SurveyQuestionMultipleText`. See https://fb.me/react-warning-keys for more information.
    in span (created by SurveyQuestionMultipleText)
    in SurveyQuestionMultipleText (created by SurveyQuestion)
    in div (created by SurveyQuestion)
    in div (created by SurveyQuestion)
    in SurveyQuestion (created by SurveyRow)
    in div (created by SurveyRow)
    in SurveyRow (created by SurveyPage)
    in div (created by SurveyPage)
    in SurveyPage (created by Survey)
    in div (created by Survey)
    in div (created by Survey)
    in form (created by Survey)
    in div (created by Survey)
    in Survey

What is the expected behavior?

Warning should not appear

How would you reproduce the current behavior (if this is a bug)?

Behavior is visible in default react example page

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/Examples/Library/?id=questiontype-multipletext&platform=Reactjs

var json = {
    questions: [
        {
            type: "multipletext",
            name: "pricelimit",
            title: "What is the... ",
            colCount: 2,
            items: [
                {
                    name: "mostamount",
                    title: "Most amount you would every pay for a product like ours"
                }, {
                    name: "leastamount",
                    title: "The least amount you would feel comfortable paying"
                }
            ]
        }
    ]
};

Specify your

  • browser: All
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.14
survey-creator Bug Translation tab doesn't take into account creator readOnly property

End-user can edit text in "Translation" tab, even if creator is read only: creator.readOnly = true;.

survey-creator Bug Choices property appears twice in property grid on adding a custom property with category equals "choices"

The following code duplicated the choices property in the property grid:

Survey.Serializer.addProperty("selectbase", {
      name: "testProperty:boolean",
      category: "choices",
    });
survey-creator Enhancement Use creator.onGetObjectDisplayName in condition property Editor

The following code will change the display text for questions that use choose in condition property editor:

creator.onGetObjectDisplayName.add(function (sender, options) {
 //We can change showing question display name for all UI elements or for only some of them 
//Here we change them for "condition" editor only
 if(options.reason !== "condition") return;
 options.displayName = options.obj.title + " [" + options.obj.name + "]";
});
survey-creator Enhancement Add maxLogicItemsInCondition option

Set this option to 1 to have only one logic item in conditions, user will not be able to add "Or"/"And" item. You can set it to 2 to limit to only two logic items and so on. Example:

      var options = {
        showLogicTab: true,
        maxLogicItemsInCondition: 1
      };
      var creator = new SurveyCreator.SurveyCreator("editor", options);

Version: v1.8.18, released at Tuesday, December 1, 2020, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Pass localizable string property name in the `onTextMarkdown` event options

This will allow to apply markdown selectively, e.g. for titles only

See the https://surveyjs.answerdesk.io/ticket/details/t5676/and-how-can-i-check-for-individual-keyup-on-every-other-text-fields-the-context-is thread for more details

We have a code duplication it these three classes for text preprocessing. It should be removed.

Product
survey-library
Type
Bug
Description
content panel in composite component has underfined renderWidth

renderWidth in contentPanel in composite component should have "100%" value.

Product
survey-library
Type
Bug
Description
React SurveyQuestionMultipleText Missing Unique "key" prop

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

When running react in dev mode you see the following error:

Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `SurveyQuestionMultipleText`. See https://fb.me/react-warning-keys for more information.
    in span (created by SurveyQuestionMultipleText)
    in SurveyQuestionMultipleText (created by SurveyQuestion)
    in div (created by SurveyQuestion)
    in div (created by SurveyQuestion)
    in SurveyQuestion (created by SurveyRow)
    in div (created by SurveyRow)
    in SurveyRow (created by SurveyPage)
    in div (created by SurveyPage)
    in SurveyPage (created by Survey)
    in div (created by Survey)
    in div (created by Survey)
    in form (created by Survey)
    in div (created by Survey)
    in Survey

What is the expected behavior?

Warning should not appear

How would you reproduce the current behavior (if this is a bug)?

Behavior is visible in default react example page

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/Examples/Library/?id=questiontype-multipletext&platform=Reactjs

var json = {
    questions: [
        {
            type: "multipletext",
            name: "pricelimit",
            title: "What is the... ",
            colCount: 2,
            items: [
                {
                    name: "mostamount",
                    title: "Most amount you would every pay for a product like ours"
                }, {
                    name: "leastamount",
                    title: "The least amount you would feel comfortable paying"
                }
            ]
        }
    ]
};

Specify your

  • browser: All
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.14
Product
survey-creator
Type
Bug
Description
Translation tab doesn't take into account creator readOnly property

End-user can edit text in "Translation" tab, even if creator is read only: creator.readOnly = true;.

The following code duplicated the choices property in the property grid:

Survey.Serializer.addProperty("selectbase", {
      name: "testProperty:boolean",
      category: "choices",
    });
Product
survey-creator
Type
Enhancement
Description
Use creator.onGetObjectDisplayName in condition property Editor

The following code will change the display text for questions that use choose in condition property editor:

creator.onGetObjectDisplayName.add(function (sender, options) {
 //We can change showing question display name for all UI elements or for only some of them 
//Here we change them for "condition" editor only
 if(options.reason !== "condition") return;
 options.displayName = options.obj.title + " [" + options.obj.name + "]";
});
Product
survey-creator
Type
Enhancement
Description
Add maxLogicItemsInCondition option

Set this option to 1 to have only one logic item in conditions, user will not be able to add "Or"/"And" item. You can set it to 2 to limit to only two logic items and so on. Example:

      var options = {
        showLogicTab: true,
        maxLogicItemsInCondition: 1
      };
      var creator = new SurveyCreator.SurveyCreator("editor", options);

Version: v1.8.15, released at Wednesday, November 25, 2020, Total Issue Count: 9

Product Type Description
survey-library Bug React: Warning: setState(...): on making invisible the current page

Getting this issue

survey-library Bug Does not show correctly detail panel in matrix on error for mode "underRowSingle"

If detailPanelMode is "underRowSingle" then the last detail panel with errored question(s) closes previous detail panels with erorrs. It should not.

survey-library Enhancement Introduce "showItemsInOrder" option for radiogroup/checkbox items.

See this ticket for more details.

survey-library Bug Header text is wrong positioned if header image on the left/right side of it
survey-library Bug Composite component doesn't preprocess text with "composite." prefix

The following JSON in composite component doesn't work:

{
      type: "dropdown",
      isRequired: true,
      renderAs: "select2",
      choicesByUrl: {
        url: "https://www.universal-tutorial.com/api/states/{composite.country}",
        titleName: "state_name",
      },
      name: "state",
      title: "State",
    }

We do not pre-process this variable {composite.country}, where 'country' is another question in the composite component.

survey-creator Enhancement Do not show second time the default locale in survey.locale and translation tab

By default we have "Default (English)" and "English" locale. It confuses end-users. We should remove "English" locale in our case and any default locale, in case, it is different from English.

survey-creator Bug Modern theme: The "Refresh" button is almost invisible in default value editor
survey-pdf Bug Not printing result for boolean elements when valueTrue/valueFalse used.

Hello.

While testing pdf library we found that bug. A question like this:

  {
   "type": "boolean",
   "name": "test",
   "defaultValue": "false",
   "label": {
    "en": "test question"
   },
   "valueTrue": "1",
   "valueFalse": "0"
  }

produces this result

{"test":"1"}

This works fine in browser but when printing to pdf with survey-pdf prints as false. pdf generation only works with {"test": true} Should evaluate result against valueTrue and valueFalse for printing.

Thanks

custom-widgets BreakingChange Bootstrap datepicker - need to use UTC

We need to use UTC as stored date/time format. It should correctly selects date, write it to question value in UTC and restore. See the https://surveyjs.answerdesk.io/ticket/details/t5725/bootstrap-datepicker-need-to-use-utc thread for more details

This is possible breaking change

Version: v1.8.15, released at Wednesday, November 25, 2020, Total Issue Count: 9

Product
survey-library
Type
Bug
Description
React: Warning: setState(...): on making invisible the current page

Getting this issue

If detailPanelMode is "underRowSingle" then the last detail panel with errored question(s) closes previous detail panels with erorrs. It should not.

Product
survey-library
Type
Enhancement
Description
Introduce "showItemsInOrder" option for radiogroup/checkbox items.

See this ticket for more details.

Product
survey-library
Type
Bug
Description
Composite component doesn't preprocess text with "composite." prefix

The following JSON in composite component doesn't work:

{
      type: "dropdown",
      isRequired: true,
      renderAs: "select2",
      choicesByUrl: {
        url: "https://www.universal-tutorial.com/api/states/{composite.country}",
        titleName: "state_name",
      },
      name: "state",
      title: "State",
    }

We do not pre-process this variable {composite.country}, where 'country' is another question in the composite component.

Product
survey-creator
Type
Enhancement
Description
Do not show second time the default locale in survey.locale and translation tab

By default we have "Default (English)" and "English" locale. It confuses end-users. We should remove "English" locale in our case and any default locale, in case, it is different from English.

Hello.

While testing pdf library we found that bug. A question like this:

  {
   "type": "boolean",
   "name": "test",
   "defaultValue": "false",
   "label": {
    "en": "test question"
   },
   "valueTrue": "1",
   "valueFalse": "0"
  }

produces this result

{"test":"1"}

This works fine in browser but when printing to pdf with survey-pdf prints as false. pdf generation only works with {"test": true} Should evaluate result against valueTrue and valueFalse for printing.

Thanks

Product
custom-widgets
Type
BreakingChange
Description
Bootstrap datepicker - need to use UTC

We need to use UTC as stored date/time format. It should correctly selects date, write it to question value in UTC and restore. See the https://surveyjs.answerdesk.io/ticket/details/t5725/bootstrap-datepicker-need-to-use-utc thread for more details

This is possible breaking change

Version: v1.8.14, released at Thursday, November 19, 2020, Total Issue Count: 14

Product Type Description
survey-library Enhancement Add detail Panel for dynamic and dropdown matrices.

Optionally, show detail panel for every row. It should take elements from detailElements property or developer could create them in code via event. The functionality is required by Creator v2.

New added properties:

  • detailPanelMode, ["none", "underRow", "underRowSingle"]. Default is "none", the detail Panel is not shown. "underRow" - shows the detail panel under the row and "underRowSingle" works as "underRow" but allows to show only one detail panel, it hides the previous opened detail panel.
  • detailElements - the array of elements that detail panel shows.
  • detailPanel - the template panel. detailElements equals to detailPanel.elements
survey-library Bug survey-react: lazy rendering works slow in comparison with survey-knockout and survey-vue platforms

See the https://surveyjs.io/Examples/Library?id=survey-lazy&platform=Reactjs&theme=modern example.

React adds new question slow. It re-renders all elements on the page. Removing changing state on changing "elements" array, since we need to react on "rows" array only and do not rerender rows and their elements that are not changed. It improves performance in almost x10 times in case of 10 questions on the page, x100 times in case of 100 questions on a page and x1000 times in case of 1000 questions on the page.

survey-library Bug Survey title text overflows header container
survey-library Enhancement Generate Survey JSON Schema

The following code will generate the JSON schema

Survey.Serializer.generateSchema();

It will contain all properties/components/customwidgets you have added. It will take into account removing/changing properties as well. Use the following code to generate the text:

JSON.stringify(Survey.Serializer.generateSchema(), null, 4)

This code can be used on client(browser) or in NodeJS server code.

survey-library Bug Accessibility bug in knockout: generates same id for errors in different row in matrices.

If there are several errors in one column in different row, then we generate the same error id for different rows in knockout.

survey-library Bug Accessibility: Add aria-expanded and aria-controls into panel expand/collapse button

For panels that has expand/collapse buttons aria-expanded and aria-controls attributes are required.

survey-creator Bug Area for dropping questions on empty panel is not shown if it has elements on loading

Steps to reproduce. Load survey in SurveyJS Creator with a panel and a question it it, then delete the question. The area for dropping questions, "Please drop a question here from the Toolbox" is invisible and you can't drop anything on the panel.

survey-creator Enhancement Refactor disabling question elements in designer

We have a specific code for "dynamic panel". We should remove this check and make the code question type agnostic.

survey-creator Bug default/correct value property editor doesn't work correctly if choicesVisibleIf/EnableIf are set

The original issue was reported into SurveyJS Support Desk.

survey-creator Bug Exception raised on editing boolean column type in columns editor.

The original issue came from SurveyJS Support Desk.

survey-creator Bug Panel drop area too small in default and modern themes
survey-creator Bug Creator tab change resets window location hash
custom-widgets Bug It is possible to take item from the one sortable question and drop it to the other sortable question drop area
custom-widgets Bug Bootstrap-datepicker doesn't apply format to date passed from model

See the https://surveyjs.answerdesk.io/ticket/details/t5690/bootstrap-datepicker-formatting-not-applied-on-initial-if-used-with-defaultvalueexpression thread for more details

var json = {
    "elements": [
        {
            "name": "date",
            "type": "bootstrapdatepicker",
            "inputType": "date",
            "title": "Your favorite date:",
            "defaultValueExpression": "today()",
            "dateFormat": "MM dd, yyyy",
            "isRequired": true
        }
    ]
};

The initial value (today) is not properly formatted

Version: v1.8.14, released at Thursday, November 19, 2020, Total Issue Count: 14

Product
survey-library
Type
Enhancement
Description
Add detail Panel for dynamic and dropdown matrices.

Optionally, show detail panel for every row. It should take elements from detailElements property or developer could create them in code via event. The functionality is required by Creator v2.

New added properties:

  • detailPanelMode, ["none", "underRow", "underRowSingle"]. Default is "none", the detail Panel is not shown. "underRow" - shows the detail panel under the row and "underRowSingle" works as "underRow" but allows to show only one detail panel, it hides the previous opened detail panel.
  • detailElements - the array of elements that detail panel shows.
  • detailPanel - the template panel. detailElements equals to detailPanel.elements

See the https://surveyjs.io/Examples/Library?id=survey-lazy&platform=Reactjs&theme=modern example.

React adds new question slow. It re-renders all elements on the page. Removing changing state on changing "elements" array, since we need to react on "rows" array only and do not rerender rows and their elements that are not changed. It improves performance in almost x10 times in case of 10 questions on the page, x100 times in case of 100 questions on a page and x1000 times in case of 1000 questions on the page.

Product
survey-library
Type
Bug
Description
Survey title text overflows header container
Product
survey-library
Type
Enhancement
Description
Generate Survey JSON Schema

The following code will generate the JSON schema

Survey.Serializer.generateSchema();

It will contain all properties/components/customwidgets you have added. It will take into account removing/changing properties as well. Use the following code to generate the text:

JSON.stringify(Survey.Serializer.generateSchema(), null, 4)

This code can be used on client(browser) or in NodeJS server code.

If there are several errors in one column in different row, then we generate the same error id for different rows in knockout.

For panels that has expand/collapse buttons aria-expanded and aria-controls attributes are required.

Steps to reproduce. Load survey in SurveyJS Creator with a panel and a question it it, then delete the question. The area for dropping questions, "Please drop a question here from the Toolbox" is invisible and you can't drop anything on the panel.

Product
survey-creator
Type
Enhancement
Description
Refactor disabling question elements in designer

We have a specific code for "dynamic panel". We should remove this check and make the code question type agnostic.

The original issue was reported into SurveyJS Support Desk.

Product
survey-creator
Type
Bug
Description
Exception raised on editing boolean column type in columns editor.

The original issue came from SurveyJS Support Desk.

Product
survey-creator
Type
Bug
Description
Panel drop area too small in default and modern themes
Product
survey-creator
Type
Bug
Description
Creator tab change resets window location hash
Product
custom-widgets
Type
Bug
Description
Bootstrap-datepicker doesn't apply format to date passed from model

See the https://surveyjs.answerdesk.io/ticket/details/t5690/bootstrap-datepicker-formatting-not-applied-on-initial-if-used-with-defaultvalueexpression thread for more details

var json = {
    "elements": [
        {
            "name": "date",
            "type": "bootstrapdatepicker",
            "inputType": "date",
            "title": "Your favorite date:",
            "defaultValueExpression": "today()",
            "dateFormat": "MM dd, yyyy",
            "isRequired": true
        }
    ]
};

The initial value (today) is not properly formatted

Version: v1.8.13, released at Tuesday, November 10, 2020, Total Issue Count: 17

Product Type Description
survey-library Bug function clearIncorrectValues() doesn't work correctly for questions that uses choicesByUrl property

When we are calling clearIncorrectValues() function, choices could be not come from the server yet. The easy solution is do nothing if choicesByUrlis set, but activeChocies is empty yet.

survey-library Enhancement Make sure that matrix dynamic question can edit array of survey elements

Matrix dynamic question can't edit array of survey elements, for examples question.choices or survey.calculatedValues. We should change the code so it will be possible to use matrix dynamic for editing SurveyJS elements arrays.

survey-library Bug react: the only page is not become visible if all elements before were invisible

The original issue came to SurveyJS Support Desk. Here is the plunker that shows the issue.

survey-library Bug Do not call server validation several times

If user press "Next" or "Complete" button fast, then the server validation can performed several times. We have to disable calling validations the second time and wait to complete the first validations. Here is the link on original ticket.

survey-library Enhancement Add maxSelectedChoices property to checkbox question

Set this property different to 0 to limit the number of selected choices in the checkbox. Unselected choices will be disabled if the number of selected equals to maxSelectedChoices property. A use will not be able to select more then maxSelectedChoices items.

survey-library Enhancement Implement alternative rendering for the boolean question (switch/checkbox)

Some users want different rendering for a boolean question - switch/checkbox See the https://surveyjs.answerdesk.io/ticket/details/t5476/multiple-choice-questions-using-matrix thread for more details

survey-library Bug vue: When setting "startWithNewLine": false on a text type question the Preview is crashing.

#1813 # Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

When setting "startWithNewLine": false on a text type question the Preview is crashing.

What is the expected behavior?

To view the Preview page

How would you reproduce the current behavior (if this is a bug)?

See the json below. For the bug to occur, you have to implement onUpdateQuestionCssClasses. The crash happens when calling sender.state or sender.isDisplayMode.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

{
  "showPreviewBeforeComplete": "showAllQuestions",
  "pages": [
    {
      "name": "page_organization",
      "title": "Test page startWithNewLine",
      "elements": [
        {
          "type": "text",
          "name": "ContactPhoneWithCountryCode",
          "title": "Telephone"
        },
        {
          "type": "text",
          "name": "ContactPhoneExtension",
          "startWithNewLine": false,
          "title": "Extension"
        }
      ]
    }
  ]
}
 survey.onUpdateQuestionCssClasses.add((sender, options) => {
        const classes = options.cssClasses;

        if (sender.state == "preview") {

        }

       if (sender.isDisplayMode === true) {

       }
 });
vue.esm.js:1897 RangeError: Maximum call stack size exceeded
    at VueSurveyModel.Base.getPropertyValue (survey-vue.js:2450)
    at VueSurveyModel.get [as mode] (survey-vue.js:17029)
    at Array.<anonymous> (surveyInit.ts:125)
    at Event.fire (survey-vue.js:3248)
    at VueSurveyModel.SurveyModel.updateQuestionCssClasses (survey-vue.js:18659)
    at QuestionTextModel.get [as cssClasses] (survey-vue.js:4190)
    at QuestionTextModel.Question.getIndentSize (survey-vue.js:4463)
    at QuestionTextModel.Question.onIndentChanged (survey-vue.js:4458)
    at Object.<anonymous> (survey-vue.js:3549)
    at QuestionTextModel.Base.propertyValueChanged (survey-vue.js:2537)

Specify your

  • browser: any
  • browser version: any
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.12
survey-library Bug vue: Could not add/remove row if a column with boolean cellType exists

The original issue was reported in SurveyJS Support desk

survey-library Bug Dynamic matrix containing dropdown field with hasOther poperty doesn't load it's data

dropdown/radiogroup/checkbox cell question with hasOther doesn't load the comment value.

survey-library Bug Panel title is not displayed in Creator on changing the title property value

For panel title not display. It always is display:none

image

survey-library Bug On survey.clear() matrix dynamic clears all rows even if minRowCount is greater than 0

The original issue was created in SurveyJS support desk.

survey-library Bug Warning cause of missing prop matrix.vue

in this commit "columnIndex" key in row 9 has been removed resulting in a warning when rendering matrix.vue component. https://github.com/surveyjs/survey-library/commit/a0ed68dddb22a6c9360b07267c572d800ef97530

<th v-for="column in question.visibleColumns" :key="columnIndex" :class="question.cssClasses.headerCell">

should be

<th v-for="(column, columnIndex) in question.visibleColumns" :key="columnIndex" :class="question.cssClasses.headerCell">

@gologames

survey-library Bug vue: matrix dynamic doesn't create new rows in some scenarios

Hi @andrewtelnov thanks for the quick reply ! I forked your example, here is mine: https://plnkr.co/edit/PlHC94Vg18R9P30o

I can add two rows. After that neither the "add row" or "remove row" button work: GIFrecord_2020-11-08_180206

Originally posted by @simevo in https://github.com/surveyjs/survey-library/issues/2443#issuecomment-723638099

survey-library Bug Triggers with complex names could execute without chaning the value

The original issue was created in SurveyJS Support Desk. The following trigger will go to "question1" on any cell change if the "Col1" in the first row is 1:

      {
        type: "skip",
        expression: "{matrix[0].Col1} = 1",
        gotoName: "question1",
      }

It should focus the "question1" on changing this cell only into 1.

survey-creator Enhancement Add readOnly property into dropdown column property editor

Add readOnly property into dropdown column property editor

custom-widgets Bug select2 doesn't work when activated by type is set

"select2" widget is not activated after this code:

Survey.CustomWidgetCollection.Instance.setActivatedBy("select2", "type");
custom-widgets Enhancement Support clearIncomplete option for inputmask widget

Version: v1.8.13, released at Tuesday, November 10, 2020, Total Issue Count: 17

When we are calling clearIncorrectValues() function, choices could be not come from the server yet. The easy solution is do nothing if choicesByUrlis set, but activeChocies is empty yet.

Product
survey-library
Type
Enhancement
Description
Make sure that matrix dynamic question can edit array of survey elements

Matrix dynamic question can't edit array of survey elements, for examples question.choices or survey.calculatedValues. We should change the code so it will be possible to use matrix dynamic for editing SurveyJS elements arrays.

The original issue came to SurveyJS Support Desk. Here is the plunker that shows the issue.

Product
survey-library
Type
Bug
Description
Do not call server validation several times

If user press "Next" or "Complete" button fast, then the server validation can performed several times. We have to disable calling validations the second time and wait to complete the first validations. Here is the link on original ticket.

Product
survey-library
Type
Enhancement
Description
Add maxSelectedChoices property to checkbox question

Set this property different to 0 to limit the number of selected choices in the checkbox. Unselected choices will be disabled if the number of selected equals to maxSelectedChoices property. A use will not be able to select more then maxSelectedChoices items.

Product
survey-library
Type
Enhancement
Description
Implement alternative rendering for the boolean question (switch/checkbox)

Some users want different rendering for a boolean question - switch/checkbox See the https://surveyjs.answerdesk.io/ticket/details/t5476/multiple-choice-questions-using-matrix thread for more details

#1813 # Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

When setting "startWithNewLine": false on a text type question the Preview is crashing.

What is the expected behavior?

To view the Preview page

How would you reproduce the current behavior (if this is a bug)?

See the json below. For the bug to occur, you have to implement onUpdateQuestionCssClasses. The crash happens when calling sender.state or sender.isDisplayMode.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

{
  "showPreviewBeforeComplete": "showAllQuestions",
  "pages": [
    {
      "name": "page_organization",
      "title": "Test page startWithNewLine",
      "elements": [
        {
          "type": "text",
          "name": "ContactPhoneWithCountryCode",
          "title": "Telephone"
        },
        {
          "type": "text",
          "name": "ContactPhoneExtension",
          "startWithNewLine": false,
          "title": "Extension"
        }
      ]
    }
  ]
}
 survey.onUpdateQuestionCssClasses.add((sender, options) => {
        const classes = options.cssClasses;

        if (sender.state == "preview") {

        }

       if (sender.isDisplayMode === true) {

       }
 });
vue.esm.js:1897 RangeError: Maximum call stack size exceeded
    at VueSurveyModel.Base.getPropertyValue (survey-vue.js:2450)
    at VueSurveyModel.get [as mode] (survey-vue.js:17029)
    at Array.<anonymous> (surveyInit.ts:125)
    at Event.fire (survey-vue.js:3248)
    at VueSurveyModel.SurveyModel.updateQuestionCssClasses (survey-vue.js:18659)
    at QuestionTextModel.get [as cssClasses] (survey-vue.js:4190)
    at QuestionTextModel.Question.getIndentSize (survey-vue.js:4463)
    at QuestionTextModel.Question.onIndentChanged (survey-vue.js:4458)
    at Object.<anonymous> (survey-vue.js:3549)
    at QuestionTextModel.Base.propertyValueChanged (survey-vue.js:2537)

Specify your

  • browser: any
  • browser version: any
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.12

The original issue was reported in SurveyJS Support desk

dropdown/radiogroup/checkbox cell question with hasOther doesn't load the comment value.

For panel title not display. It always is display:none

image

The original issue was created in SurveyJS support desk.

Product
survey-library
Type
Bug
Description
Warning cause of missing prop matrix.vue

in this commit "columnIndex" key in row 9 has been removed resulting in a warning when rendering matrix.vue component. https://github.com/surveyjs/survey-library/commit/a0ed68dddb22a6c9360b07267c572d800ef97530

<th v-for="column in question.visibleColumns" :key="columnIndex" :class="question.cssClasses.headerCell">

should be

<th v-for="(column, columnIndex) in question.visibleColumns" :key="columnIndex" :class="question.cssClasses.headerCell">

@gologames

Product
survey-library
Type
Bug
Description
vue: matrix dynamic doesn't create new rows in some scenarios

Hi @andrewtelnov thanks for the quick reply ! I forked your example, here is mine: https://plnkr.co/edit/PlHC94Vg18R9P30o

I can add two rows. After that neither the "add row" or "remove row" button work: GIFrecord_2020-11-08_180206

Originally posted by @simevo in https://github.com/surveyjs/survey-library/issues/2443#issuecomment-723638099

Product
survey-library
Type
Bug
Description
Triggers with complex names could execute without chaning the value

The original issue was created in SurveyJS Support Desk. The following trigger will go to "question1" on any cell change if the "Col1" in the first row is 1:

      {
        type: "skip",
        expression: "{matrix[0].Col1} = 1",
        gotoName: "question1",
      }

It should focus the "question1" on changing this cell only into 1.

Product
survey-creator
Type
Enhancement
Description
Add readOnly property into dropdown column property editor

Add readOnly property into dropdown column property editor

Product
custom-widgets
Type
Bug
Description
select2 doesn't work when activated by type is set

"select2" widget is not activated after this code:

Survey.CustomWidgetCollection.Instance.setActivatedBy("select2", "type");
Product
custom-widgets
Type
Enhancement
Description
Support clearIncomplete option for inputmask widget

Version: v1.8.12, released at Wednesday, October 28, 2020, Total Issue Count: 4

Product Type Description
survey-library Enhancement Add ability to use any Survey Element as data for survey

Add survey.editingObj: Base property. When it is not empty the survey will use editingObj properties as values. For example:

var survey = new Survey.SurveyModel(); 
survey.editingObj = anotherSurvey.getQuestionByName("question1");
var name = survey.getValue("name"); //name will be equal to question1
survey.setValue("isRequired", true); //question1 becomes required

The idea is to allow edit any object properties by our Survey

survey-library Bug Composite question doesn't clear values for its invisible questions

If survey.clearInvisibleValues is not "none", survey asks invsible question to clear their values. However it doesn't work for composite question.

survey-library Bug clearIncorrectValues function doesn't work correctly panel dynamic

If there is a comment for a question inside dynamic panel, for example comment for other value in radiogroup, then clearIncorrectValues function clears it. It should keep comment value in this case.

custom-widgets Bug Placeholder doesn't work for the select2 widget

See original issue

Version: v1.8.12, released at Wednesday, October 28, 2020, Total Issue Count: 4

Product
survey-library
Type
Enhancement
Description
Add ability to use any Survey Element as data for survey

Add survey.editingObj: Base property. When it is not empty the survey will use editingObj properties as values. For example:

var survey = new Survey.SurveyModel(); 
survey.editingObj = anotherSurvey.getQuestionByName("question1");
var name = survey.getValue("name"); //name will be equal to question1
survey.setValue("isRequired", true); //question1 becomes required

The idea is to allow edit any object properties by our Survey

Product
survey-library
Type
Bug
Description
Composite question doesn't clear values for its invisible questions

If survey.clearInvisibleValues is not "none", survey asks invsible question to clear their values. However it doesn't work for composite question.

Product
survey-library
Type
Bug
Description
clearIncorrectValues function doesn't work correctly panel dynamic

If there is a comment for a question inside dynamic panel, for example comment for other value in radiogroup, then clearIncorrectValues function clears it. It should keep comment value in this case.

Product
custom-widgets
Type
Bug
Description
Placeholder doesn't work for the select2 widget

See original issue

Version: v1.8.11, released at Saturday, October 24, 2020, Total Issue Count: 8

Product Type Description
survey-library Bug onPropertyChanged or onItemValuePropertyChanged callbacks doesn't work with ":multiplevalues" property

onPropertyChanged or onItemValuePropertyChanged question callbacks doesn't work when item of ":multiplevalues" property checked/unchecked. For example, it leads to incorrect work of Undo/Redo functionality in Creator. UPD: Here is the simple example:

Survey.Serializer.addProperty("carowner", {name: "letters:multiplevalues", choices: ["A", "B", "C", "D", "E", "F"] });

SurveyJS Creator creates a list of checkboxes from "A", ... ,"F" and the value of the property is an array on letters.

Currently, the SurveyJS Library creates a standard property for this type, while it should create a wrapper for JavaScript array to override push/pop/unshift/splice functions and call property change notification.

survey-library Bug checkErrorMode equals "onComplete" doesn't work correctly with the server validation

There are two issues there. At first server validation, survey.onServerValidateQuestions event, executed on next page, and doesn't take into account that checkErrorMode is "onComplete". The second issue, on focusing question it doesn't change the current page and if the question with the error is located on a previous page, not the last one, end-user will not see any error and the last page will be the current one.

survey-library Bug Do not generate an empty rows error for matrix dynamic if it not requried and minRowCount is set

The original issue came from SurveyJS Support Desk.

survey-library Enhancement Add removeNonExisingRootKeys parameter into survey.clearIncorrectValues function

Add removeNonExisingRootKeys parameter, it is false by default.

//@param removeNonExisingRootKeys - set this parameter to true to remove keys from survey.data that doesn't have corresponded questions and calculated values
public clearIncorrectValues(removeNonExisingRootKeys: boolean = false);
survey-library Enhancement Add requiredIf property to the Panel
  /**
   * An expression that returns true or false. If it returns true the Panel becomes required.
   * The library runs the expression on survey start and on changing a question value. 
   * If the property is empty then isRequired property is used.
   * @see isRequired
   */
panel.requiredIf(): string;
survey-creator Bug Translation tab should not offer to translate properties with isSerialized attribute equals to true

Translation tab creates a group for non serializable properties. It should not.

survey-creator Enhancement Change the way of how hovered question will be highlighted

At the moment question actions are shown on question hover. Sometimes (for elements in the same line) this leads to actions overlapping and weird UI. See the https://surveyjs.answerdesk.io/ticket/details/t5530/start-in-new-line-view-bugs thread for more details.

I've changed hover question highlighting from actions display to showing question border on hover

custom-widgets Enhancement Add orientation property into bootstrap slider

Add orientation property:

{
 name: "orientation",
 default: "horizontal",
 choices: ["horizontal", "vertical"],
 category: "general"
}

Version: v1.8.11, released at Saturday, October 24, 2020, Total Issue Count: 8

onPropertyChanged or onItemValuePropertyChanged question callbacks doesn't work when item of ":multiplevalues" property checked/unchecked. For example, it leads to incorrect work of Undo/Redo functionality in Creator. UPD: Here is the simple example:

Survey.Serializer.addProperty("carowner", {name: "letters:multiplevalues", choices: ["A", "B", "C", "D", "E", "F"] });

SurveyJS Creator creates a list of checkboxes from "A", ... ,"F" and the value of the property is an array on letters.

Currently, the SurveyJS Library creates a standard property for this type, while it should create a wrapper for JavaScript array to override push/pop/unshift/splice functions and call property change notification.

There are two issues there. At first server validation, survey.onServerValidateQuestions event, executed on next page, and doesn't take into account that checkErrorMode is "onComplete". The second issue, on focusing question it doesn't change the current page and if the question with the error is located on a previous page, not the last one, end-user will not see any error and the last page will be the current one.

The original issue came from SurveyJS Support Desk.

Product
survey-library
Type
Enhancement
Description
Add removeNonExisingRootKeys parameter into survey.clearIncorrectValues function

Add removeNonExisingRootKeys parameter, it is false by default.

//@param removeNonExisingRootKeys - set this parameter to true to remove keys from survey.data that doesn't have corresponded questions and calculated values
public clearIncorrectValues(removeNonExisingRootKeys: boolean = false);
Product
survey-library
Type
Enhancement
Description
Add requiredIf property to the Panel
  /**
   * An expression that returns true or false. If it returns true the Panel becomes required.
   * The library runs the expression on survey start and on changing a question value. 
   * If the property is empty then isRequired property is used.
   * @see isRequired
   */
panel.requiredIf(): string;

Translation tab creates a group for non serializable properties. It should not.

Product
survey-creator
Type
Enhancement
Description
Change the way of how hovered question will be highlighted

At the moment question actions are shown on question hover. Sometimes (for elements in the same line) this leads to actions overlapping and weird UI. See the https://surveyjs.answerdesk.io/ticket/details/t5530/start-in-new-line-view-bugs thread for more details.

I've changed hover question highlighting from actions display to showing question border on hover

Product
custom-widgets
Type
Enhancement
Description
Add orientation property into bootstrap slider

Add orientation property:

{
 name: "orientation",
 default: "horizontal",
 choices: ["horizontal", "vertical"],
 category: "general"
}

Version: v1.8.10, released at Wednesday, October 21, 2020, Total Issue Count: 20

Product Type Description
survey-library Bug The requiredQuestions progress bar works wrong
  1. Go to https://plnkr.co/edit/Ru1uuCWejE8mJXgT

  2. Click choice of required question and get this: image

  3. Then click next and get this: image

survey-library Bug React warning with slider component: setState(...):Cannot update during an existing state transition

Warning: setState(...): Cannot update during an existing state transition (such as within render or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to componentWillMount.

this warning appears every time when i click next

survey-library Bug survey.getProgress() logs weird output on console

I have some questions that have visible: "false" That means they are invisible to users.

I want to track the survey completion progress. So, I have set the following: "progressBarType":"questions"

Then I have this in the js file: var surveyProgress = survey.getProgress(); console.log(surveyProgress);

Are you requesting a feature, reporting a bug or asking a question?

bug

asking question

What is the current behavior?

survey.getProgress() logs weird output on console. Even when the survey is answered fully then also the progress is not 100 percent.

What is the expected behavior?

If say 6 out of 23 visible questions are answered then the progress should be 26 percent.

How would you reproduce the current behavior (if this is a bug)?

survey.getProgress() logs incorrect output on console.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

your_code_here

Specify your

  • browser: chrome
  • browser version: 84+
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.6
survey-library Enhancement File question: set desired dropEffect to "copy"
survey-library Enhancement Add autoComplete property into text Question

autoComplete property set the autocomplete attribute for html input tag.

survey-library Bug When survey checkErrorsMode is "onComplete" then the question with the first error is not focused

Let's say we have the following JSON:

{
      checkErrorsMode: "onComplete",
      pages: [
        {
          elements: [
            { type: "text", name: "q0" },
            { type: "text", name: "q1", isRequired: true },
          ],
        },
        {
          elements: [{ type: "text", name: "q2", isRequired: true }],
        },
        {
          elements: [{ type: "text", name: "q3", isRequired: true }],
        },
      ],
    }

If a user click button "Next" and then "Complete" without entering any data, then it should come back into first page and the question "q1", the first question with the error should be focused. Currently it doesn't work correctly, question "q0" is focused.

survey-library Enhancement Add settings.matrixMaxRowCountInCondition

By default we show one row with all columns in condition property editor. For example: dynamicMatrixQuestionName[0].columnName. You can change this property to show more rows, by setting it to 2, Survey.settings.matrixMaxRowCountInCondition = 2; will add colums for the second row as : dynamicMatrixQuestionName[1].columnName if matrix rowCount is 2 or bigger.

The original request came from SurveyJS Support Desk.

survey-library Enhancement react: Refactor render() and reactive properties

Disable reactive properties to change the element state during rendering by moving all rendering into protected renderElement(). Here is the render() function code in SurveyElementBase class:

  render(): JSX.Element {
    if (!this.canRender()) return null;
    this.isRenderingValue = true;
    var res = this.renderElement();
    this.isRenderingValue = false;
    return res;
  }

We should use renderElement() function in our react classes. The read-only protected isRendering property will block chaning state on changing the value react properties that can happen during react rendering.

survey-library Enhancement Add isUnique attribute into JSON property

This attribute works for objects that uses in arrays. Currently we use this attribute for matrixdropdowncolumn and calculatedvalue classes. Here is the definition of calculatedvalue.

Serializer.addClass(
  "calculatedvalue",
  [{name: "!name", isUnique: true}, "expression:expression", "includeIntoResult:boolean"],
  function() {
    return new CalculatedValue();
  },
  "base"
);

If you do not want to have a unique column names for matrix dropdown/dynamic please use the following code:

Survey.Serializer.findProperty("matrixdropdowncolumn", "name").isUnique = false;
survey-library Bug vue: tagbox doesn't work as a question cell in matrix dynamic/dropdown

There is a "undefined" error if you are using tagbox custom widget in the matrix dynamic/dropdown as a cell question.

survey-library Enhancement vue: refactor nofying Vue about property change

The idea is to avoid untificial notifying Vue on property change during rendering

survey-creator Bug After Removing the "title-image" Adorner, an invalid image placeholder shows up in Title
survey-creator Enhancement Add support for dataList attribute in string property editor

We have the following property in text question now and we need to support it:

    {
      name: "autoComplete",
      dataList: [
        "name",
        "honorific-prefix",
        "given-name",
        "additional-name",
        "family-name",
        "honorific-suffix",
        "nickname",
        "organization-title",
        "username",
        "new-password",
        "current-password",
        "organization",
        "street-address",
        "address-line1",
        "address-line2",
        "address-line3",
        "address-level4",
        "address-level3",
        "address-level2",
        "address-level1",
        "country",
        "country-name",
        "postal-code",
        "cc-name",
        "cc-given-name",
        "cc-additional-name",
        "cc-family-name",
        "cc-number",
        "cc-exp",
        "cc-exp-month",
        "cc-exp-year",
        "cc-csc",
        "cc-type",
        "transaction-currency",
        "transaction-amount",
        "language",
        "bday",
        "bday-day",
        "bday-month",
        "bday-year",
        "sex",
        "url",
        "photo",
        "tel",
        "tel-country-code",
        "tel-national",
        "tel-area-code",
        "tel-local",
        "tel-local-prefix",
        "tel-local-suffix",
        "tel-extension",
        "email",
        "impp",
      ],
    }
survey-creator Enhancement Add support for isUnique attribute in JSON property

Show error and do not allow to set non-unique property value to the object. Please read more about isUnique property attribute here.

survey-creator Bug Items property editor shows the "Add New" button if allowAddRemoveItems option is set to false

See the https://surveyjs.answerdesk.io/ticket/details/t5490/setting-allowaddremoveitems-to-false-in-onsetpropertyeditoroptions-does-not-work thread for more details

Choices item adorner doesn't respect the allowAddRemoveItems option also

survey-creator Bug Nested properties editor allows to edit values even if properties are readOnly

Running the code, that makes columns property read-only, will still allow to modify name and title column properties in the table.

Survey.Serializer.findProperty("matrixdropdownbase", "columns").readOnly = true;

This code should make nested properties read-only as well.

survey-creator Bug Title editor adorner doesn't respect the onGetPropertyReadOnly event handler
  creator.onGetPropertyReadOnly.add(function(sender, options){
      options.readOnly = isLoadingJSON || options.obj.wasInJSON;
  });

See the https://surveyjs.answerdesk.io/ticket/details/t5487/differentiate-between-questions-loaded-from-json-and-newly-added-questions-dynamic thread for more details

survey-creator Bug Choice items adorner doesn't respect the onElementAllowOperations event handler
  creator.onElementAllowOperations.add(function (sender, options) {
      var allow = !isLoadingJSON && !options.obj.wasInJSON;
      options.allowDelete = allow;
      options.allowEdit = allow;
      options.allowCopy = allow;
      options.allowAddToToolbox = allow;
      options.allowDragging = allow;
      options.allowChangeType = allow;
      options.allowChangeRequired = allow;
      options.allowShowHideTitle = allow;
  });

See the https://surveyjs.answerdesk.io/ticket/details/t5487/differentiate-between-questions-loaded-from-json-and-newly-added-questions-dynamic thread for more details

survey-analytics Enhancement Make top margin to fit ModeBar in SelectBasePlotly
custom-widgets Bug bootstrap datepicker has incorrect default dateFormat

It should be default: "mm/dd/yyyy" instead of default: "'mm/dd/yyyy'".

Version: v1.8.10, released at Wednesday, October 21, 2020, Total Issue Count: 20

Product
survey-library
Type
Bug
Description
The requiredQuestions progress bar works wrong
  1. Go to https://plnkr.co/edit/Ru1uuCWejE8mJXgT

  2. Click choice of required question and get this: image

  3. Then click next and get this: image

Warning: setState(...): Cannot update during an existing state transition (such as within render or another component's constructor). Render methods should be a pure function of props and state; constructor side-effects are an anti-pattern, but can be moved to componentWillMount.

this warning appears every time when i click next

Product
survey-library
Type
Bug
Description
survey.getProgress() logs weird output on console

I have some questions that have visible: "false" That means they are invisible to users.

I want to track the survey completion progress. So, I have set the following: "progressBarType":"questions"

Then I have this in the js file: var surveyProgress = survey.getProgress(); console.log(surveyProgress);

Are you requesting a feature, reporting a bug or asking a question?

bug

asking question

What is the current behavior?

survey.getProgress() logs weird output on console. Even when the survey is answered fully then also the progress is not 100 percent.

What is the expected behavior?

If say 6 out of 23 visible questions are answered then the progress should be 26 percent.

How would you reproduce the current behavior (if this is a bug)?

survey.getProgress() logs incorrect output on console.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

Test code

your_code_here

Specify your

  • browser: chrome
  • browser version: 84+
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.6
Product
survey-library
Type
Enhancement
Description
File question: set desired dropEffect to "copy"
Product
survey-library
Type
Enhancement
Description
Add autoComplete property into text Question

autoComplete property set the autocomplete attribute for html input tag.

Let's say we have the following JSON:

{
      checkErrorsMode: "onComplete",
      pages: [
        {
          elements: [
            { type: "text", name: "q0" },
            { type: "text", name: "q1", isRequired: true },
          ],
        },
        {
          elements: [{ type: "text", name: "q2", isRequired: true }],
        },
        {
          elements: [{ type: "text", name: "q3", isRequired: true }],
        },
      ],
    }

If a user click button "Next" and then "Complete" without entering any data, then it should come back into first page and the question "q1", the first question with the error should be focused. Currently it doesn't work correctly, question "q0" is focused.

Product
survey-library
Type
Enhancement
Description
Add settings.matrixMaxRowCountInCondition

By default we show one row with all columns in condition property editor. For example: dynamicMatrixQuestionName[0].columnName. You can change this property to show more rows, by setting it to 2, Survey.settings.matrixMaxRowCountInCondition = 2; will add colums for the second row as : dynamicMatrixQuestionName[1].columnName if matrix rowCount is 2 or bigger.

The original request came from SurveyJS Support Desk.

Product
survey-library
Type
Enhancement
Description
react: Refactor render() and reactive properties

Disable reactive properties to change the element state during rendering by moving all rendering into protected renderElement(). Here is the render() function code in SurveyElementBase class:

  render(): JSX.Element {
    if (!this.canRender()) return null;
    this.isRenderingValue = true;
    var res = this.renderElement();
    this.isRenderingValue = false;
    return res;
  }

We should use renderElement() function in our react classes. The read-only protected isRendering property will block chaning state on changing the value react properties that can happen during react rendering.

Product
survey-library
Type
Enhancement
Description
Add isUnique attribute into JSON property

This attribute works for objects that uses in arrays. Currently we use this attribute for matrixdropdowncolumn and calculatedvalue classes. Here is the definition of calculatedvalue.

Serializer.addClass(
  "calculatedvalue",
  [{name: "!name", isUnique: true}, "expression:expression", "includeIntoResult:boolean"],
  function() {
    return new CalculatedValue();
  },
  "base"
);

If you do not want to have a unique column names for matrix dropdown/dynamic please use the following code:

Survey.Serializer.findProperty("matrixdropdowncolumn", "name").isUnique = false;

There is a "undefined" error if you are using tagbox custom widget in the matrix dynamic/dropdown as a cell question.

Product
survey-library
Type
Enhancement
Description
vue: refactor nofying Vue about property change

The idea is to avoid untificial notifying Vue on property change during rendering

Product
survey-creator
Type
Enhancement
Description
Add support for dataList attribute in string property editor

We have the following property in text question now and we need to support it:

    {
      name: "autoComplete",
      dataList: [
        "name",
        "honorific-prefix",
        "given-name",
        "additional-name",
        "family-name",
        "honorific-suffix",
        "nickname",
        "organization-title",
        "username",
        "new-password",
        "current-password",
        "organization",
        "street-address",
        "address-line1",
        "address-line2",
        "address-line3",
        "address-level4",
        "address-level3",
        "address-level2",
        "address-level1",
        "country",
        "country-name",
        "postal-code",
        "cc-name",
        "cc-given-name",
        "cc-additional-name",
        "cc-family-name",
        "cc-number",
        "cc-exp",
        "cc-exp-month",
        "cc-exp-year",
        "cc-csc",
        "cc-type",
        "transaction-currency",
        "transaction-amount",
        "language",
        "bday",
        "bday-day",
        "bday-month",
        "bday-year",
        "sex",
        "url",
        "photo",
        "tel",
        "tel-country-code",
        "tel-national",
        "tel-area-code",
        "tel-local",
        "tel-local-prefix",
        "tel-local-suffix",
        "tel-extension",
        "email",
        "impp",
      ],
    }
Product
survey-creator
Type
Enhancement
Description
Add support for isUnique attribute in JSON property

Show error and do not allow to set non-unique property value to the object. Please read more about isUnique property attribute here.

See the https://surveyjs.answerdesk.io/ticket/details/t5490/setting-allowaddremoveitems-to-false-in-onsetpropertyeditoroptions-does-not-work thread for more details

Choices item adorner doesn't respect the allowAddRemoveItems option also

Running the code, that makes columns property read-only, will still allow to modify name and title column properties in the table.

Survey.Serializer.findProperty("matrixdropdownbase", "columns").readOnly = true;

This code should make nested properties read-only as well.

  creator.onGetPropertyReadOnly.add(function(sender, options){
      options.readOnly = isLoadingJSON || options.obj.wasInJSON;
  });

See the https://surveyjs.answerdesk.io/ticket/details/t5487/differentiate-between-questions-loaded-from-json-and-newly-added-questions-dynamic thread for more details

  creator.onElementAllowOperations.add(function (sender, options) {
      var allow = !isLoadingJSON && !options.obj.wasInJSON;
      options.allowDelete = allow;
      options.allowEdit = allow;
      options.allowCopy = allow;
      options.allowAddToToolbox = allow;
      options.allowDragging = allow;
      options.allowChangeType = allow;
      options.allowChangeRequired = allow;
      options.allowShowHideTitle = allow;
  });

See the https://surveyjs.answerdesk.io/ticket/details/t5487/differentiate-between-questions-loaded-from-json-and-newly-added-questions-dynamic thread for more details

Product
survey-analytics
Type
Enhancement
Description
Make top margin to fit ModeBar in SelectBasePlotly
Product
custom-widgets
Type
Bug
Description
bootstrap datepicker has incorrect default dateFormat

It should be default: "mm/dd/yyyy" instead of default: "'mm/dd/yyyy'".

Version: v1.8.9, released at Wednesday, October 14, 2020, Total Issue Count: 10

Product Type Description
survey-library Bug End-user can drop/add a file into read-only file question

If a file question read-only, then choose file button is disabled, but drag-over area still accept files, also it should not.

survey-library Enhancement Improve API for adding a new page

There is no way to insert a new page as the first one or the second. We need to add a parameter into survey.addNewPage and survey.addPage functions.

  /**
   * Adds an existing page to the survey.
   * @param page a newly added page
   * @param index - a page index to where insert a page. It is -1 by default and the page will be added into the end.
   * @see addNewPage
   */
  public addPage(page: PageModel, index: number = -1);
  /**
   * Creates a new page and adds it to a survey. Generates a new name if the `name` parameter is not specified.
   * @param name a page name
   * @param index - a page index to where insert a new page. It is -1 by default and the page will be added into the end.
   * @see addPage
   */
  public addNewPage(name: string = null, index: number = -1) ;

Additionally makes the survey.createNewPage() function public:

  /**
   * Creates and returns a new page, but do not add it into the survey.
   * You can use addPage(page) function to add it into survey later.
   * @see addPage
   * @see addNewPage
   */
  public createNewPage(name: string): PageModel;

Example of using:

var newPage = survey.createNewPage("new Page");
newPage.addNewQuestion("text", "newQuestion");
survey.addPage(newPage, 0);
survey.currentPageNo = 0;
survey-library Bug Locale of progressbar does not change

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

If you change the language of the survey, the locale of the progressbar does not change.

What is the expected behavior?

Progressbar should update too.

How would you reproduce the current behavior (if this is a bug)?

Change the locale. https://plnkr.co/edit/0o1cxceHuYOFXKyq

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/0o1cxceHuYOFXKyq

Specify your

  • browser: Chrome
  • browser version: 86
  • surveyjs platform (angular or react or jquery or knockout or vue): angular
  • surveyjs version: 1.8.8
survey-library Bug react: SurveyWindow component renders window header twice

SurveyWindow should renders window header only one time.

survey-library Bug Localizable string can generate a warning in react

You can get the followng warning: "Warning: Can't perform a React state update on an unmounted component" because of localizable string did not perform correctly unmount.

survey-library Enhancement Make survey.core works under NodeJS

The following code should work and should not return any error in NodeJS:

const Survey = require("./survey.core");

var survey = new Survey.SurveyModel({
  pages: [
    {
      elements: [
        { type: "text", name: "q1", isRequired: true },
        { type: "text", name: "q2" },
      ],
    },
    {
      elements: [
        { type: "text", name: "q2" },
        { type: "text", name: "q3" },
      ],
    },
  ],
});
survey.nextPage();
console.log(survey.pages.length.toString());
survey-analytics Enhancement Create sample how to visualize text question with chart visualizer

See the https://surveyjs.answerdesk.io/ticket/details/t5424/analytics-angular-register-visualizer-as-selectbaseplotly-for-rating-type-question thread for more details:

I want to render visualization with bar/pie/doughnut for text type question. (For example: the question is for postal_code)

survey-analytics Bug Top N option should work for all chart types
custom-widgets Enhancement Allow add new tag in the tagbox widget

Select2 optinally allows to add new tag. We should add this option as: allowAddNewTag:boolean, false by default.

custom-widgets Bug input custom widget: Cannot read property 'getemptymask' of undefined

TypeError: Cannot read property 'getemptymask' of undefined at HTMLInputElement.el.onblur (inputmask.js:98) at removeChild (react-dom.js:1364) at Object.processUpdates (react-dom.js:1510) at Object.dangerouslyProcessChildrenUpdates [as processChildrenUpdates] (react-dom.js:6766) at processQueue (react-dom.js:10215) at ReactDOMComponent._updateChildren (react-dom.js:10431) at ReactDOMComponent.updateChildren (react-dom.js:10375) at ReactDOMComponent._updateDOMChildren (react-dom.js:6357) at ReactDOMComponent.updateComponent (react-dom.js:6171) at ReactDOMComponent.receiveComponent (react-dom.js:6133)

Json "elements": [ { "type": "text", "inputType": "date", "inputMask": "datetime", "inputFormat": "dd/mm/yyyy", "name": "QBday", "startWithNewLine": false, "title": "What is your Birthday?", //"dateFormat": "dd/mm/yy", "isRequired": true, "validators": [ { "type": "expression", "text": "You should be atleast 10 years or older", "expression": "age() >= 10" } ], "max": "31/12/2999", "description": "Remember age is just a number :-)" } ]

In which type of situation, this error appears in surveyjs

Version: v1.8.9, released at Wednesday, October 14, 2020, Total Issue Count: 10

Product
survey-library
Type
Bug
Description
End-user can drop/add a file into read-only file question

If a file question read-only, then choose file button is disabled, but drag-over area still accept files, also it should not.

Product
survey-library
Type
Enhancement
Description
Improve API for adding a new page

There is no way to insert a new page as the first one or the second. We need to add a parameter into survey.addNewPage and survey.addPage functions.

  /**
   * Adds an existing page to the survey.
   * @param page a newly added page
   * @param index - a page index to where insert a page. It is -1 by default and the page will be added into the end.
   * @see addNewPage
   */
  public addPage(page: PageModel, index: number = -1);
  /**
   * Creates a new page and adds it to a survey. Generates a new name if the `name` parameter is not specified.
   * @param name a page name
   * @param index - a page index to where insert a new page. It is -1 by default and the page will be added into the end.
   * @see addPage
   */
  public addNewPage(name: string = null, index: number = -1) ;

Additionally makes the survey.createNewPage() function public:

  /**
   * Creates and returns a new page, but do not add it into the survey.
   * You can use addPage(page) function to add it into survey later.
   * @see addPage
   * @see addNewPage
   */
  public createNewPage(name: string): PageModel;

Example of using:

var newPage = survey.createNewPage("new Page");
newPage.addNewQuestion("text", "newQuestion");
survey.addPage(newPage, 0);
survey.currentPageNo = 0;
Product
survey-library
Type
Bug
Description
Locale of progressbar does not change

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

If you change the language of the survey, the locale of the progressbar does not change.

What is the expected behavior?

Progressbar should update too.

How would you reproduce the current behavior (if this is a bug)?

Change the locale. https://plnkr.co/edit/0o1cxceHuYOFXKyq

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/0o1cxceHuYOFXKyq

Specify your

  • browser: Chrome
  • browser version: 86
  • surveyjs platform (angular or react or jquery or knockout or vue): angular
  • surveyjs version: 1.8.8
Product
survey-library
Type
Bug
Description
react: SurveyWindow component renders window header twice

SurveyWindow should renders window header only one time.

Product
survey-library
Type
Bug
Description
Localizable string can generate a warning in react

You can get the followng warning: "Warning: Can't perform a React state update on an unmounted component" because of localizable string did not perform correctly unmount.

Product
survey-library
Type
Enhancement
Description
Make survey.core works under NodeJS

The following code should work and should not return any error in NodeJS:

const Survey = require("./survey.core");

var survey = new Survey.SurveyModel({
  pages: [
    {
      elements: [
        { type: "text", name: "q1", isRequired: true },
        { type: "text", name: "q2" },
      ],
    },
    {
      elements: [
        { type: "text", name: "q2" },
        { type: "text", name: "q3" },
      ],
    },
  ],
});
survey.nextPage();
console.log(survey.pages.length.toString());
Product
survey-analytics
Type
Enhancement
Description
Create sample how to visualize text question with chart visualizer

See the https://surveyjs.answerdesk.io/ticket/details/t5424/analytics-angular-register-visualizer-as-selectbaseplotly-for-rating-type-question thread for more details:

I want to render visualization with bar/pie/doughnut for text type question. (For example: the question is for postal_code)

Product
survey-analytics
Type
Bug
Description
Top N option should work for all chart types
Product
custom-widgets
Type
Enhancement
Description
Allow add new tag in the tagbox widget

Select2 optinally allows to add new tag. We should add this option as: allowAddNewTag:boolean, false by default.

Product
custom-widgets
Type
Bug
Description
input custom widget: Cannot read property 'getemptymask' of undefined

TypeError: Cannot read property 'getemptymask' of undefined at HTMLInputElement.el.onblur (inputmask.js:98) at removeChild (react-dom.js:1364) at Object.processUpdates (react-dom.js:1510) at Object.dangerouslyProcessChildrenUpdates [as processChildrenUpdates] (react-dom.js:6766) at processQueue (react-dom.js:10215) at ReactDOMComponent._updateChildren (react-dom.js:10431) at ReactDOMComponent.updateChildren (react-dom.js:10375) at ReactDOMComponent._updateDOMChildren (react-dom.js:6357) at ReactDOMComponent.updateComponent (react-dom.js:6171) at ReactDOMComponent.receiveComponent (react-dom.js:6133)

Json "elements": [ { "type": "text", "inputType": "date", "inputMask": "datetime", "inputFormat": "dd/mm/yyyy", "name": "QBday", "startWithNewLine": false, "title": "What is your Birthday?", //"dateFormat": "dd/mm/yy", "isRequired": true, "validators": [ { "type": "expression", "text": "You should be atleast 10 years or older", "expression": "age() >= 10" } ], "max": "31/12/2999", "description": "Remember age is just a number :-)" } ]

In which type of situation, this error appears in surveyjs

Version: v1.8.8, released at Saturday, October 10, 2020, Total Issue Count: 9

Product Type Description
survey-library Enhancement Add survey.runTriggers() function
  /**
   * Run all triggers that performs on value changed and not on moving to the next page.
   */
  public runTriggers(): void;

You can use this function if you have modified your survey difinition and add new triggers and want to run them on setting the previous entered data:

survey.data = previousEnteredData;
survey.runTriggers(); //run triggers like copyvalue, setvalue, runexpression.
survey-library Bug Vue: undefined click handler error on clicking checkbox items in modern theme

The original issue came from SurveyJS support desk. On clicking checkbox items in modern theme vue generates an error

survey-library Bug Expression parser removes quotes for string constants

The following code new ConditionsParser().parseExpression("{val} == '000'").toString() will return " == 000". What is worth the following code:

var expr = "{val} == '000'";
expr = new ConditionsParser().parseExpression(expr).toString();
expr = new ConditionsParser().parseExpression(expr).toString();

will set expr to "{val} == 0" instead of keep the same value "{val} == '000'"

survey-creator Bug Incorrect Rating "Rate step" HTML validation

Are you requesting a feature, reporting a bug or ask a question?

A bug.

What is the current behavior?

Rating "Rate step" HTML5 validation error on correct value. image

What is the expected behavior?

No HTML5 validation errors.

How would you reproduce the current behavior (if this is a bug)?

It happens when Survey Creator is embedded on a page and HTML5 form validation triggered.

Specify your

  • browser: Google Chrome 85.0.4183.121 (Official Build) (64-bit)
  • editor version: 1.8.6
survey-creator Enhancement Embeded tab, show surveyPostId in JSON in

Simplify the code and instead of using onComplete event, use surveyPostId survey property.

survey-creator Bug Surveys that we create inside Creator for internal use should use Creator localization locale

Setting Survey Creator localization locale as: SurveyCreator.localization.currentLocale = "fr"; doesn't set locale 'fr' for surveys that we use in condition property editor. As result localization strings for internal surveys are still in "en" locale.

survey-creator Bug Add quotes for expression constants as "000"

If an end-user enters into condition value in the condition property editor value as "012" or "000" we should recognize that it is not a number, but string and put it into quotes as: {val} == '000'`.

survey-creator Bug Editing choices for a column in dynamic/dropdown matrices is broken

The original issue came from SurveyJS Support Desk.

survey-creator Enhancement Add bindings property editor

Currently we have only two bindable property: rowCount in matrix dynamic and panelCount in panel dynamic. We will add bindable properties based on our users requests and their scenarios. Bindable property - you can create a two way binding between a question value and another question property. The following JSON set the binding for dynamic panel panelCount property:

  {
   "elements": [
    {
     "type": "text",
     "name": "elCount",
     "inputType": "number",
     "defaultValue": 3
    },
    {
     "type": "paneldynamic",
     "name": "panel1",
     "bindings": {
      "panelCount": "elCount"
     }
    }
   ]
  }

On changing elCount question value, the panel count for panel dynamic is changing and vise versa, on adding/removing panels in the panel dynamic, the value in elCount is changing accordingly.

Version: v1.8.8, released at Saturday, October 10, 2020, Total Issue Count: 9

Product
survey-library
Type
Enhancement
Description
Add survey.runTriggers() function
  /**
   * Run all triggers that performs on value changed and not on moving to the next page.
   */
  public runTriggers(): void;

You can use this function if you have modified your survey difinition and add new triggers and want to run them on setting the previous entered data:

survey.data = previousEnteredData;
survey.runTriggers(); //run triggers like copyvalue, setvalue, runexpression.

The original issue came from SurveyJS support desk. On clicking checkbox items in modern theme vue generates an error

Product
survey-library
Type
Bug
Description
Expression parser removes quotes for string constants

The following code new ConditionsParser().parseExpression("{val} == '000'").toString() will return " == 000". What is worth the following code:

var expr = "{val} == '000'";
expr = new ConditionsParser().parseExpression(expr).toString();
expr = new ConditionsParser().parseExpression(expr).toString();

will set expr to "{val} == 0" instead of keep the same value "{val} == '000'"

Product
survey-creator
Type
Bug
Description
Incorrect Rating "Rate step" HTML validation

Are you requesting a feature, reporting a bug or ask a question?

A bug.

What is the current behavior?

Rating "Rate step" HTML5 validation error on correct value. image

What is the expected behavior?

No HTML5 validation errors.

How would you reproduce the current behavior (if this is a bug)?

It happens when Survey Creator is embedded on a page and HTML5 form validation triggered.

Specify your

  • browser: Google Chrome 85.0.4183.121 (Official Build) (64-bit)
  • editor version: 1.8.6
Product
survey-creator
Type
Enhancement
Description
Embeded tab, show surveyPostId in JSON in

Simplify the code and instead of using onComplete event, use surveyPostId survey property.

Setting Survey Creator localization locale as: SurveyCreator.localization.currentLocale = "fr"; doesn't set locale 'fr' for surveys that we use in condition property editor. As result localization strings for internal surveys are still in "en" locale.

Product
survey-creator
Type
Bug
Description
Add quotes for expression constants as "000"

If an end-user enters into condition value in the condition property editor value as "012" or "000" we should recognize that it is not a number, but string and put it into quotes as: {val} == '000'`.

Product
survey-creator
Type
Bug
Description
Editing choices for a column in dynamic/dropdown matrices is broken

The original issue came from SurveyJS Support Desk.

Product
survey-creator
Type
Enhancement
Description
Add bindings property editor

Currently we have only two bindable property: rowCount in matrix dynamic and panelCount in panel dynamic. We will add bindable properties based on our users requests and their scenarios. Bindable property - you can create a two way binding between a question value and another question property. The following JSON set the binding for dynamic panel panelCount property:

  {
   "elements": [
    {
     "type": "text",
     "name": "elCount",
     "inputType": "number",
     "defaultValue": 3
    },
    {
     "type": "paneldynamic",
     "name": "panel1",
     "bindings": {
      "panelCount": "elCount"
     }
    }
   ]
  }

On changing elCount question value, the panel count for panel dynamic is changing and vise versa, on adding/removing panels in the panel dynamic, the value in elCount is changing accordingly.

Version: v1.8.7, released at Tuesday, October 6, 2020, Total Issue Count: 14

Product Type Description
survey-library Bug Triggers referencing question names with dot not working

Are you requesting a feature, reporting a bug or asking a question?

bug

What is the current behavior?

When using a dot in a question name triggers do not work

What is the expected behavior?

Triggers work with dots in question name

How would you reproduce the current behavior (if this is a bug)?

Create a question with a dot in question name. Use a trigger with this question name.

Provide the test code and the tested page URL (if applicable)

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3",
      "item4"
     ]
    },
    {
     "type": "text",
     "name": "question.name2"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "expression": "{question1} anyof ['item1', 'item2']",
   "setToName": "question.name2",
   "setValue": "one"
  },
  {
   "type": "setvalue",
   "expression": "{question1} anyof ['item3', 'item4']",
   "setToName": "question.name2",
   "setValue": "two"
  }
 ]
}

Specify your

  • browser: Chrome
  • browser version: 85.0.4183.102
  • surveyjs platform (angular or react or jquery or knockout or vue): vue
  • survey-vue version: 1.8.5
survey-library Bug Rating question set value as string for react and vue

Event if rating values are numbers, for react and vue the result becomes as string, "3", instead of 3.

survey-library Bug showInvisibleElements not working for choices

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

showInvisibleElements does only affect choicesVisibleIf but not:

  • visibleIf of choices/rows/columns
  • columnsVisibleIf
  • rowsVisibleIf

What is the expected behavior?

All visibility conditions should be affected.

How would you reproduce the current behavior (if this is a bug)?

Set showInvisibleElements to true and see if the elements get visible.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/Yb6iHIuO4s51xmH4 The option "Tesla" should be visible in the first question.

Specify your

  • browser: Chrome
  • browser version: 85
  • surveyjs platform (angular or react or jquery or knockout or vue): Angular
  • surveyjs version: 1.8.4
survey-library Enhancement Add survey.getUpdatedQuestionNo event
  /**
   * Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
   * <br/> `options.question` - a question object.
   * @see showQuestionNumbers
   * @see questionStartIndex
   */
  public onGetQuestionNo: Event<
    (sender: SurveyModel, options: any) => any,
    any
  > = new Event<(sender: SurveyModel, options: any) => any, any>();

Example of using:

  survey.onGetQuestionNo.add(function (sender, options) {
    options.no = "a.b." + options.no + ")";
  });

or

  survey.onGetQuestionNo.add(function (sender, options) {
    options.no = "a.b." + (options.question.visibleIndex + 1) + ")";
  });
survey-library Bug setvalue trigger doesn't work correctly for matrix dropdown cells if destination row is empty

The following JSON will not work, untill the second matrix first row is empty:

{
    questions: [
      {
        name: "q1",
        type: "matrixdropdown",
        columns: [{ name: "col1" }, { name: "col2" }],
        rows: ["row1", "row2"],
        cellType: "text",
      },
      {
        name: "q2",
        type: "matrixdropdown",
        columns: [{ name: "col3" }, { name: "col4" }],
        rows: ["row3", "row4"],
        cellType: "text",
      },
    ],
    triggers: [
      {
        type: "copyvalue",
        expression: "{q1.row1.col1} notempty",
        fromName: "q1.row1.col1",
        setToName: "q2.row3.col3",
      },
    ],
  }
survey-library Bug question.defaultValue and survey.clearInvisibleValues='onHidden' doesn't work correct together

Here is the small JSON

{
      clearInvisibleValues: "onHidden",
      elements: [
        {
          name: "q1",
          type: "text",
          defaultValue: 1,
          visible: false,
        },
      ],
    }

By default question is invisible, but it has value since defaultValue set the value into question. However, it is not expected, since survey.clearInvisibleValues is 'onHidden'. On making the question visible, and then invisible and visible again, the value becomes empty, also it would be expected to have it 1, the defaultValue. We should keep the value empty until the question is invisible and set the defaultValue on making the question visible when survey.clearInvisibleValues is 'onHidden'.

survey-library Bug Vue infinite update loop in SurveyMatrix

Are you requesting a feature, reporting a bug or asking a question?

Reporting a BUG

What is the current behavior?

When using Matrix with Vue, when you choose an answer it becomes unresponsive for a few seconds, depending on how long is the matrix, then in console it throws a error

vue.js:634 [Vue warn]: You may have an infinite update loop in a component render function.

found in

---> <SurveyMatrix> at src/vue/matrix.vue

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

https://plnkr.co/edit/9RhKmqvlkSaoqs2k

Specify your

  • browser: Chrome
  • browser version: 85.0.4183.121
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.6
survey-library Bug {question.length} may return undefined if q becomes undefined

We are returning 0 for even if question value is undefined and not an empty array. However, if the question1 value was the array, and then it becomes an undefined/null value then we start to return undefined, on using internal ProcessValue.getValueInfo() function. It uses the cached path and if a value in this path becomes undefined then it returns undefined as well. We should return 0. It is the expected value in an expression in this case.

The issue was introduced several months ago due perfomance optimization - we do not create the path for the complex values "a.b.c.d" on getting the value every time.

survey-library Enhancement Add access to a question for a custom function that calls from validator

The following code should work:

  FunctionFactory.Instance.register("getCustValue", function getCustValue(
    params
  ) {
   //access to a question instance without passing it into params as question name: this.survey.getQuestionByName(params[0])
    return this.question.inputType == "number" ? this.question.value : 0;
  });
  var survey = new SurveyModel({
    elements: [
      {
        name: "q1",
        type: "text",
        validators: [{ type: "expression", expression: "getCustValue() > 5" }],
      },
    ],
  });
survey-creator Bug Changes into new added question onQuestionAdded event generates addition undo transactions

If there is a code like this:

  creator.onQuestionAdded.add(function (sender, options) {
    options.question.title = "new title";
  });

then it would require to click two times on "Undo" to remove the question. Changing title will be added as a new undo transaction. If there are several properties changes, then more "Undo" clicks would be required. The same story with onPageAdded and onPanelAdded events.

survey-creator Enhancement Update property grid element selector on changing any property of the selected object

creator.onGetObjectTextInPropertyGrid event can use any property of the selected object, not only name and title. Right now it is called on changing name and title properties only.

survey-creator Enhancement Force to update text in property grid element selector for a non selected element

Call the following code for example: creator.updateObjectTextInPropertyGrid(creator.survey.getQuestionByName("question1");

survey-creator Enhancement Allow to show help for properties in a property grid

To show the help in the property grid, you have to modify your localization as the following:

//Get default localization strings
var curStrings = SurveyCreator.localization.getLocale("");
curStrings.pehelp.title = "Here is the help for title property for all object types";
//If we do not define question_title/page_title/survey_title, then title help will be used.
curStrings.pehelp.question_title = "Here is the help for question title property";
curStrings.pehelp.page_title = "Here is the help for page title property";
curStrings.pehelp.survey_title = "Here is the help for survey title property";
survey-analytics Enhancement Make it possible to pre-process chart data before display

Some scenarios can require to pre-process chart data before display: hide items with zero answers count, show top N or other similar cases. We need to support some cases out of the box and provide a mechanism to implement such user requirements.

See the https://surveyjs.answerdesk.io/ticket/details/t5339/analytics-angular-hide-not-chosen-choices-from-the-visualization https://surveyjs.answerdesk.io/ticket/details/t5348/analytics-angular-how-to-set-orderbyansweres-as-desc-on-initialize-bar-chart threads for more details

Version: v1.8.7, released at Tuesday, October 6, 2020, Total Issue Count: 14

Product
survey-library
Type
Bug
Description
Triggers referencing question names with dot not working

Are you requesting a feature, reporting a bug or asking a question?

bug

What is the current behavior?

When using a dot in a question name triggers do not work

What is the expected behavior?

Triggers work with dots in question name

How would you reproduce the current behavior (if this is a bug)?

Create a question with a dot in question name. Use a trigger with this question name.

Provide the test code and the tested page URL (if applicable)

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "dropdown",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3",
      "item4"
     ]
    },
    {
     "type": "text",
     "name": "question.name2"
    }
   ]
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "expression": "{question1} anyof ['item1', 'item2']",
   "setToName": "question.name2",
   "setValue": "one"
  },
  {
   "type": "setvalue",
   "expression": "{question1} anyof ['item3', 'item4']",
   "setToName": "question.name2",
   "setValue": "two"
  }
 ]
}

Specify your

  • browser: Chrome
  • browser version: 85.0.4183.102
  • surveyjs platform (angular or react or jquery or knockout or vue): vue
  • survey-vue version: 1.8.5
Product
survey-library
Type
Bug
Description
Rating question set value as string for react and vue

Event if rating values are numbers, for react and vue the result becomes as string, "3", instead of 3.

Product
survey-library
Type
Bug
Description
showInvisibleElements not working for choices

Are you requesting a feature, reporting a bug or asking a question?

Bug

What is the current behavior?

showInvisibleElements does only affect choicesVisibleIf but not:

  • visibleIf of choices/rows/columns
  • columnsVisibleIf
  • rowsVisibleIf

What is the expected behavior?

All visibility conditions should be affected.

How would you reproduce the current behavior (if this is a bug)?

Set showInvisibleElements to true and see if the elements get visible.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://plnkr.co/edit/Yb6iHIuO4s51xmH4 The option "Tesla" should be visible in the first question.

Specify your

  • browser: Chrome
  • browser version: 85
  • surveyjs platform (angular or react or jquery or knockout or vue): Angular
  • surveyjs version: 1.8.4
Product
survey-library
Type
Enhancement
Description
Add survey.getUpdatedQuestionNo event
  /**
   * Use this event to change the question no in code. If you want to remove question numbering then set showQuestionNumbers to "off".
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.no` - a calculated question no, based on question `visibleIndex`, survey `.questionStartIndex` properties. You can change it.
   * <br/> `options.question` - a question object.
   * @see showQuestionNumbers
   * @see questionStartIndex
   */
  public onGetQuestionNo: Event<
    (sender: SurveyModel, options: any) => any,
    any
  > = new Event<(sender: SurveyModel, options: any) => any, any>();

Example of using:

  survey.onGetQuestionNo.add(function (sender, options) {
    options.no = "a.b." + options.no + ")";
  });

or

  survey.onGetQuestionNo.add(function (sender, options) {
    options.no = "a.b." + (options.question.visibleIndex + 1) + ")";
  });

The following JSON will not work, untill the second matrix first row is empty:

{
    questions: [
      {
        name: "q1",
        type: "matrixdropdown",
        columns: [{ name: "col1" }, { name: "col2" }],
        rows: ["row1", "row2"],
        cellType: "text",
      },
      {
        name: "q2",
        type: "matrixdropdown",
        columns: [{ name: "col3" }, { name: "col4" }],
        rows: ["row3", "row4"],
        cellType: "text",
      },
    ],
    triggers: [
      {
        type: "copyvalue",
        expression: "{q1.row1.col1} notempty",
        fromName: "q1.row1.col1",
        setToName: "q2.row3.col3",
      },
    ],
  }

Here is the small JSON

{
      clearInvisibleValues: "onHidden",
      elements: [
        {
          name: "q1",
          type: "text",
          defaultValue: 1,
          visible: false,
        },
      ],
    }

By default question is invisible, but it has value since defaultValue set the value into question. However, it is not expected, since survey.clearInvisibleValues is 'onHidden'. On making the question visible, and then invisible and visible again, the value becomes empty, also it would be expected to have it 1, the defaultValue. We should keep the value empty until the question is invisible and set the defaultValue on making the question visible when survey.clearInvisibleValues is 'onHidden'.

Product
survey-library
Type
Bug
Description
Vue infinite update loop in SurveyMatrix

Are you requesting a feature, reporting a bug or asking a question?

Reporting a BUG

What is the current behavior?

When using Matrix with Vue, when you choose an answer it becomes unresponsive for a few seconds, depending on how long is the matrix, then in console it throws a error

vue.js:634 [Vue warn]: You may have an infinite update loop in a component render function.

found in

---> <SurveyMatrix> at src/vue/matrix.vue

How would you reproduce the current behavior (if this is a bug)?

Provide the test code and the tested page URL (if applicable)

https://plnkr.co/edit/9RhKmqvlkSaoqs2k

Specify your

  • browser: Chrome
  • browser version: 85.0.4183.121
  • surveyjs platform (angular or react or jquery or knockout or vue): Vue
  • surveyjs version: 1.8.6
Product
survey-library
Type
Bug
Description
{question.length} may return undefined if q becomes undefined

We are returning 0 for even if question value is undefined and not an empty array. However, if the question1 value was the array, and then it becomes an undefined/null value then we start to return undefined, on using internal ProcessValue.getValueInfo() function. It uses the cached path and if a value in this path becomes undefined then it returns undefined as well. We should return 0. It is the expected value in an expression in this case.

The issue was introduced several months ago due perfomance optimization - we do not create the path for the complex values "a.b.c.d" on getting the value every time.

Product
survey-library
Type
Enhancement
Description
Add access to a question for a custom function that calls from validator

The following code should work:

  FunctionFactory.Instance.register("getCustValue", function getCustValue(
    params
  ) {
   //access to a question instance without passing it into params as question name: this.survey.getQuestionByName(params[0])
    return this.question.inputType == "number" ? this.question.value : 0;
  });
  var survey = new SurveyModel({
    elements: [
      {
        name: "q1",
        type: "text",
        validators: [{ type: "expression", expression: "getCustValue() > 5" }],
      },
    ],
  });

If there is a code like this:

  creator.onQuestionAdded.add(function (sender, options) {
    options.question.title = "new title";
  });

then it would require to click two times on "Undo" to remove the question. Changing title will be added as a new undo transaction. If there are several properties changes, then more "Undo" clicks would be required. The same story with onPageAdded and onPanelAdded events.

creator.onGetObjectTextInPropertyGrid event can use any property of the selected object, not only name and title. Right now it is called on changing name and title properties only.

Call the following code for example: creator.updateObjectTextInPropertyGrid(creator.survey.getQuestionByName("question1");

Product
survey-creator
Type
Enhancement
Description
Allow to show help for properties in a property grid

To show the help in the property grid, you have to modify your localization as the following:

//Get default localization strings
var curStrings = SurveyCreator.localization.getLocale("");
curStrings.pehelp.title = "Here is the help for title property for all object types";
//If we do not define question_title/page_title/survey_title, then title help will be used.
curStrings.pehelp.question_title = "Here is the help for question title property";
curStrings.pehelp.page_title = "Here is the help for page title property";
curStrings.pehelp.survey_title = "Here is the help for survey title property";
Product
survey-analytics
Type
Enhancement
Description
Make it possible to pre-process chart data before display

Some scenarios can require to pre-process chart data before display: hide items with zero answers count, show top N or other similar cases. We need to support some cases out of the box and provide a mechanism to implement such user requirements.

See the https://surveyjs.answerdesk.io/ticket/details/t5339/analytics-angular-hide-not-chosen-choices-from-the-visualization https://surveyjs.answerdesk.io/ticket/details/t5348/analytics-angular-how-to-set-orderbyansweres-as-desc-on-initialize-bar-chart threads for more details

Version: v1.8.5, released at Wednesday, September 30, 2020, Total Issue Count: 13

Product Type Description
survey-library Bug Fix "sv-matrix__text--checked" style name

We have incorrect unicode symbol "c" in this style name. It produces issues.

survey-library Bug Signature Pad has black background for dataFormat JPEG

On setting dateFormat to "JPEG" the background turns to black.

survey-library Bug text question: min, max and step properties can not be loaded from JSON

The following JSON doesn't work:

{
    "type": "text",
    "name": "question1",
    "min": 0,
    "max": 100,
    "inputType": "number"
}

It will work if min and max properties put after inputType property. It should work in all cases.

survey-library Enhancement Introduce question.defaultValueExpression and text question.min/maxValueExpression properties

Current we require to use "=" in properties defaultValue and min/max to tell SurveyJS that we are entering the expression. For example: defaultValue: "=today(-1)", it will set the value by default to yesterday. Unfortunately, it is hard to create a decent UI for this type of property type, when it can be date or number or expression. We decided to introduce new properties that will come into Logic category. defaultValueExpression and minValueExpression/maxValueExpression where user can enter the expression in expression property editor.

Old JSON will continue to work, but on loading from JSON other properties will be used. For example defaultValue: "=today(-1)" will be converted into defaultValueExpression: "today(-1)".

survey-library Enhancement Introduce lazy rendering mode for page/panel rows content

At this moment all logically visible questions on a page or panel rendered always during page rendering. If one has a lot of questions (especially complex questions like matrices) this heavily impact survey page rendering time.

Proposed solution: not to render content (questions) of rows that in the first moment are out of the scrolling area and not visible in the current viewport.

survey-creator Enhancement Allow to restrict expression operators

The original request came from SurveyJS support desk. Currently, there is no way to remove some operators. From v1.8.5 it can be done by using this code:

  delete SurveyCreator.SurveyPropertyEditorFactory.operators.contains;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.notcontains;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.anyof;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.allof;

It will remove "contains", "notcontains", "anyof" and "allof".

survey-creator Bug Themes in Embeded Tab is out of date

We have different theme engine and default theme is "modern" that uses "modern.css" file. Embeded Tab becomes out of date. It has to be fixed.

survey-creator Enhancement Make expression property editor compact

Move help text into invisible by default area. Make the editor height smaller.

survey-creator Bug Make undo/redo buttons in JSON editor enabled only if corresponding actions are available

At this moment Undo/Redo buttons in JSON editor are always available. This looks weird. And leads to unexpected behavior if pressed. See the https://surveyjs.answerdesk.io/ticket/details/t5321/undo-and-redo-issues-in-json-editor-tab thread for more details.

survey-analytics Enhancement Implement an event to configure the export chart to image parameters

This should allow to change image format, file name and exported image size

See also this thread - https://surveyjs.answerdesk.io/ticket/details/t5311/analytics-angular-download-plot-as-a-png-with-user-given-filename

survey-analytics Enhancement Introduce an event to configure chart settings (traces, layout and config)
custom-widgets Bug On clearing value in select2 the null value is adding into choices
custom-widgets Bug datepicker is not disabled if question is read-only

If question is read-only initially then datepicker is enabled. It becomes disabled/enabled on chaning the question isReadOnly property value, but doesn't use the initial value.

Version: v1.8.5, released at Wednesday, September 30, 2020, Total Issue Count: 13

Product
survey-library
Type
Bug
Description
Fix "sv-matrix__text--checked" style name

We have incorrect unicode symbol "c" in this style name. It produces issues.

Product
survey-library
Type
Bug
Description
Signature Pad has black background for dataFormat JPEG

On setting dateFormat to "JPEG" the background turns to black.

The following JSON doesn't work:

{
    "type": "text",
    "name": "question1",
    "min": 0,
    "max": 100,
    "inputType": "number"
}

It will work if min and max properties put after inputType property. It should work in all cases.

Current we require to use "=" in properties defaultValue and min/max to tell SurveyJS that we are entering the expression. For example: defaultValue: "=today(-1)", it will set the value by default to yesterday. Unfortunately, it is hard to create a decent UI for this type of property type, when it can be date or number or expression. We decided to introduce new properties that will come into Logic category. defaultValueExpression and minValueExpression/maxValueExpression where user can enter the expression in expression property editor.

Old JSON will continue to work, but on loading from JSON other properties will be used. For example defaultValue: "=today(-1)" will be converted into defaultValueExpression: "today(-1)".

Product
survey-library
Type
Enhancement
Description
Introduce lazy rendering mode for page/panel rows content

At this moment all logically visible questions on a page or panel rendered always during page rendering. If one has a lot of questions (especially complex questions like matrices) this heavily impact survey page rendering time.

Proposed solution: not to render content (questions) of rows that in the first moment are out of the scrolling area and not visible in the current viewport.

Product
survey-creator
Type
Enhancement
Description
Allow to restrict expression operators

The original request came from SurveyJS support desk. Currently, there is no way to remove some operators. From v1.8.5 it can be done by using this code:

  delete SurveyCreator.SurveyPropertyEditorFactory.operators.contains;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.notcontains;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.anyof;
  delete SurveyCreator.SurveyPropertyEditorFactory.operators.allof;

It will remove "contains", "notcontains", "anyof" and "allof".

Product
survey-creator
Type
Bug
Description
Themes in Embeded Tab is out of date

We have different theme engine and default theme is "modern" that uses "modern.css" file. Embeded Tab becomes out of date. It has to be fixed.

Product
survey-creator
Type
Enhancement
Description
Make expression property editor compact

Move help text into invisible by default area. Make the editor height smaller.

At this moment Undo/Redo buttons in JSON editor are always available. This looks weird. And leads to unexpected behavior if pressed. See the https://surveyjs.answerdesk.io/ticket/details/t5321/undo-and-redo-issues-in-json-editor-tab thread for more details.

Product
survey-analytics
Type
Enhancement
Description
Implement an event to configure the export chart to image parameters

This should allow to change image format, file name and exported image size

See also this thread - https://surveyjs.answerdesk.io/ticket/details/t5311/analytics-angular-download-plot-as-a-png-with-user-given-filename

Product
survey-analytics
Type
Enhancement
Description
Introduce an event to configure chart settings (traces, layout and config)
Product
custom-widgets
Type
Bug
Description
On clearing value in select2 the null value is adding into choices
Product
custom-widgets
Type
Bug
Description
datepicker is not disabled if question is read-only

If question is read-only initially then datepicker is enabled. It becomes disabled/enabled on chaning the question isReadOnly property value, but doesn't use the initial value.

Version: v1.8.4, released at Tuesday, September 22, 2020, Total Issue Count: 11

Product Type Description
survey-library Enhancement Matrix dynamic/dropdown should take into account survey.storeOthersAsComment property

Currently, columns do not save others and comments with comment postfix: as "columnName-Comment" : columnCommentValue. Matrix cells store comments/others in column value directly. Instead of: {columnName: "other", "columnName-Comment": "valueEnteredIntoOtherInput"} we always have: {columnName: "valueEnteredIntoOtherInput"}, even if survey.storeOthersAsComment equals to true (default value). We have to take into account survey.storeOthersAsComment for matrices. We have to support settings old data format into matrices, since otherwise we could break previous created surveys with old data format.

survey-library Enhancement Highlight unanswered rows in matrix question

Is there a way to highlight unanswered questions in type matrix?

isAllRowRequired just gives an error message but no highlight

survey-library Enhancement Show error text on saving results in surveyjs.io service

Show the response from our service on error on saving the survey results. You should set surveyShowDataSaving and surveyPostId, something like this:

survey.surveyShowDataSaving = true;
survey.surveyPostId = "1a81e24f-3a09-4fcc-a915-e76beddf8XXX",

In this case SurveyJS will use our web API to post the survey result into our database and show the progress.

survey-library Bug survey.textUpdateMode = "onTyping" should work for entering number in text question

survey.textUpdateMode = "onTyping" should work for text questions with inputType equals to "text" and "number".

survey-library Enhancement Refactor matrix question - code duplication and remove pure knockout objects

Remove knockout observable classes and move css code to model classes.

survey-library Bug choicesByUrl doesn't work with {NOCACHE}/{CACHE}

The following JSON simply doesn't work:

              {
                type: "checkbox",
                name: "question1",
                choicesByUrl: {
                  url: "https://restcountries.eu/rest/v2/all{NOCACHE}",
                  valueName: "name",
                },
              },
survey-library Bug Modifying matrix value onValueChanging event doesn't change UI

Here is the original issue. The requrement is to select just one row in the matrix. If an user select a cell in another row, then clear the previous row.

This code should does the trick - unselect/remove the previously selected row value.

survey.onValueChanging.add(function(sender, options){
  if(options.name !== "ourMatrixQuestionName") return;
  var keys = [];
  for(var key in options.value) {
      keys.push(key);
  }
  if(keys.length == 2 && !!options.oldValue) {
      for(var key in options.oldValue) {
          delete options.value[key];
          break;
      }
  });

Unfortunately, the row.value in the UI model is not changed and as result UI doesn't react on this value modification.

survey-library Bug Age function in expression is evaluating to true if the date provided is of future

Are you requesting a feature, reporting a bug or asking a question?

Reporting a bug

What is the current behavior?

If date is provided for the future, the age function in expression is still returning true

What is the expected behavior?

Age should only be calculated till current date

How would you reproduce the current behavior (if this is a bug)?

{
            "name": "page3",
            "elements": [
                {
                    "type": "text",
                    "inputType": "date",
                    "inputMask": "datetime",
                    "inputFormat": "dd/mm/yyyy",
                    "name": "QBday",
                    "startWithNewLine": false,
                    "title": "What is your birthday?",
                    //"dateFormat": "dd/mm/yy",
                    "isRequired": true,
                    "validators": [
                        {
                         "type": "expression",
                         "text": "You should be atleast 10 years or older",
                         "expression": "age({QBday}) >= 10"
                        }
                       ],
                       "max": "31/12/2999"
                }
            ]
        }

and then enter date for the future for example 20/10/2035, the expression will evaluate as true

Specify your

  • browser: Chrome
  • browser version:Version 85.0.4183.102
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version:1.8.3

Check the below screenshot depicting the exact issue in the source code in function age. Check the WATCH panel for the evaluated return statement. A simple if check for negative value will do a fix

image

survey-creator Bug Missing role="tab" attribute in designer tabs markup
survey-creator Enhancement Add creator.showModalElementEditor() function

creator.showElementEditor() function can focus the property grid, based on creator options. For example when property grid is used for editing properties, default behavior in the current version. There is a need to show modal window for editing properties without changing the behavior. creator.showModalElementEditor() function does it.

  /**
   * Show the creator dialog. The element can be a question, panel, page or survey.
   * @param element The survey element
   * @param onClose Callback function on closing dialog window. It has isCanceled boolean paratemer. It is true if a user cancel changes.
   * @see onElementEditorClosed
   */
  public showModalElementEditor(
    element: Survey.Base,
    onClose: (isCanceled: boolean) => any = null
  );
custom-widgets Bug Drag n drop console error when tagbox dragged from toolbox in SurveyJS Creator

While drag it over a panel and drop it through some console error(screen shot attached), but when I click add tagbox in the question designer section, than drag drop on a panel just works as expected.

See the https://surveyjs.answerdesk.io/ticket/details/t5218/tagbox-inside-panel-drag-n-drop-console-error thread for more details

Version: v1.8.4, released at Tuesday, September 22, 2020, Total Issue Count: 11

Currently, columns do not save others and comments with comment postfix: as "columnName-Comment" : columnCommentValue. Matrix cells store comments/others in column value directly. Instead of: {columnName: "other", "columnName-Comment": "valueEnteredIntoOtherInput"} we always have: {columnName: "valueEnteredIntoOtherInput"}, even if survey.storeOthersAsComment equals to true (default value). We have to take into account survey.storeOthersAsComment for matrices. We have to support settings old data format into matrices, since otherwise we could break previous created surveys with old data format.

Product
survey-library
Type
Enhancement
Description
Highlight unanswered rows in matrix question

Is there a way to highlight unanswered questions in type matrix?

isAllRowRequired just gives an error message but no highlight