Cart Buy Licenses Contact Integrate into App Docs Support Login/Register
v 1.8.72

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

Product Type Description
survey-library Enhancement beginUpdate()/endUpdate() function for dynamic and dropdown matrices

If a matrix has been already rendered and you need to make several changes: add/remove several columns, modify column cell types, add/remove rows and so on, it would trigger multiple changes and re-rendering. In this case, to improve the performance you can use beginUpdate() and endUpdate() functions. For example:

questionMatrix.beginUpdate();
questionMatrix.columns.splice(0, 1);
questionMatrix.columns[1].cellType = "text";
questionMatrix.addColumn("col4");
questionMatrix.rowCount = 5;
questionMatrix.endUpdate();

We need this functionality for Creator V2, translation tab. We have to modify hundreds matrices and without this functionality the performance is bad.

survey-library Bug Typescript error with release 1.8.72

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

Bug

What is the current behavior?

Error when building for production

Error: node_modules/survey-angular/survey.angular.d.ts:8:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

8 const innerKo: any;

What is the expected behavior?

Should succeed when building for production

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

run

ng build

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

Tested page URL:

Test code

your_code_here

Specify your

  • surveyjs platform (angular or react or jquery or knockout or vue): angular-survey
  • surveyjs version: 1.8.72
survey-library Enhancement Support "parentpanel" in expression for nested dynamic panels

If there is a nested dynamic panel (dynamic panel inside another dynamic panel), then to access values in expression from the parent panel can by using "parentpanel" prefix. Here is the JSON example. "child_question1" becomes visible when an user set any value into checkbox_root question and child_question2 shows choices that selected in checkbox_root.

{
      elements: [
        {
          type: "paneldynamic",
          name: "rootPanel",
          panelCount: 1,
          templateElements: [
            {
              type: "checkbox",
              name: "checkbox_root",
              choices: ["item1", "item2", "item3"],
            },
            {
              type: "paneldynamic",
              name: "childPanel",
              minPanelCount: 1,
              templateElements: [
                {
                  type: "text",
                  name: "child_question1",
                 visibleIf: "{parentpanel.checkbox_root} notempty"
                },
                {
                  type: "checkbox",
                  name: "child_question2",
                  hideIfChoicesEmpty: true,
                  choicesVisibleIf: "{parentpanel.checkbox_root} contains {item}",
                  choices: ["item1", "item2", "item3"],
                }
              ]
            }
          ]
        }
      ]
    }
survey-library Bug We should not set question title value if it equals to question name

If a question has name "question1" on calling question.title = "question1" we should not set question title value to "question1" since it took the default value from question.name anyway. The bug was found during testing Creator V2. Here is the scenario:

question.name = "question1";
//question title will be rendered as question1 now, if it is empty
question.title = "question1";
question.name = "question2";
//question title renders as question1 now and it leads to confusions.
survey-library Bug @property doesn't work correctly with defaultValue for localizable strings

We can't use defaultValue for declearing localizable properties. A new attribute defaultStr has been introduced. Here is the example of using:

@property({ localizable: { defaultStr: "confirmRemoveFile" } }) confirmRemoveMessage: string;

This code will create localizable property and get the default value from localizable strings using the function in the gettter, istead of setting the default value from localization property on creating object.

survey-library Bug Knockout: Custom widget in matrices

SurveyJS in knockout pass incorrect root element into custom widget. It is a td, instead of div element inside this td element. It works correctly in react and vue.

survey-analytics Bug Support filtering for questions with complex structure (matrices)
survey-analytics Enhancement support "Bar" graph for the datetime questions

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

Product
survey-library
Type
Enhancement
Description
beginUpdate()/endUpdate() function for dynamic and dropdown matrices

If a matrix has been already rendered and you need to make several changes: add/remove several columns, modify column cell types, add/remove rows and so on, it would trigger multiple changes and re-rendering. In this case, to improve the performance you can use beginUpdate() and endUpdate() functions. For example:

questionMatrix.beginUpdate();
questionMatrix.columns.splice(0, 1);
questionMatrix.columns[1].cellType = "text";
questionMatrix.addColumn("col4");
questionMatrix.rowCount = 5;
questionMatrix.endUpdate();

We need this functionality for Creator V2, translation tab. We have to modify hundreds matrices and without this functionality the performance is bad.

Product
survey-library
Type
Bug
Description
Typescript error with release 1.8.72

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

Bug

What is the current behavior?

Error when building for production

Error: node_modules/survey-angular/survey.angular.d.ts:8:1 - error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier.

8 const innerKo: any;

What is the expected behavior?

Should succeed when building for production

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

run

ng build

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

Tested page URL:

Test code

your_code_here

Specify your

  • surveyjs platform (angular or react or jquery or knockout or vue): angular-survey
  • surveyjs version: 1.8.72
Product
survey-library
Type
Enhancement
Description
Support "parentpanel" in expression for nested dynamic panels

If there is a nested dynamic panel (dynamic panel inside another dynamic panel), then to access values in expression from the parent panel can by using "parentpanel" prefix. Here is the JSON example. "child_question1" becomes visible when an user set any value into checkbox_root question and child_question2 shows choices that selected in checkbox_root.

{
      elements: [
        {
          type: "paneldynamic",
          name: "rootPanel",
          panelCount: 1,
          templateElements: [
            {
              type: "checkbox",
              name: "checkbox_root",
              choices: ["item1", "item2", "item3"],
            },
            {
              type: "paneldynamic",
              name: "childPanel",
              minPanelCount: 1,
              templateElements: [
                {
                  type: "text",
                  name: "child_question1",
                 visibleIf: "{parentpanel.checkbox_root} notempty"
                },
                {
                  type: "checkbox",
                  name: "child_question2",
                  hideIfChoicesEmpty: true,
                  choicesVisibleIf: "{parentpanel.checkbox_root} contains {item}",
                  choices: ["item1", "item2", "item3"],
                }
              ]
            }
          ]
        }
      ]
    }
Product
survey-library
Type
Bug
Description
We should not set question title value if it equals to question name

If a question has name "question1" on calling question.title = "question1" we should not set question title value to "question1" since it took the default value from question.name anyway. The bug was found during testing Creator V2. Here is the scenario:

question.name = "question1";
//question title will be rendered as question1 now, if it is empty
question.title = "question1";
question.name = "question2";
//question title renders as question1 now and it leads to confusions.

We can't use defaultValue for declearing localizable properties. A new attribute defaultStr has been introduced. Here is the example of using:

@property({ localizable: { defaultStr: "confirmRemoveFile" } }) confirmRemoveMessage: string;

This code will create localizable property and get the default value from localizable strings using the function in the gettter, istead of setting the default value from localization property on creating object.

Product
survey-library
Type
Bug
Description
Knockout: Custom widget in matrices

SurveyJS in knockout pass incorrect root element into custom widget. It is a td, instead of div element inside this td element. It works correctly in react and vue.

Product
survey-analytics
Type
Bug
Description
Support filtering for questions with complex structure (matrices)
Product
survey-analytics
Type
Enhancement
Description
support "Bar" graph for the datetime questions

Version: v1.8.72, released at Tuesday, October 12, 2021, Total Issue Count: 10

Product Type Description
survey-library Enhancement Change Default Error Required Text (make it more English)

Base proposal is to change: "Please answer the question." to "Response required."

we have the following props:

  requiredError: "Please answer the question.",
  requiredErrorInPanel: "Please answer at least one question.",
  requiredInAllRowsError: "Please answer questions in all rows.",

Here the src: https://github.com/surveyjs/survey-library/blob/4084fc31e0773980d4a7621eb3d79ba4354172e8/src/localization/english.ts#L24

Another potential candidate is the following prop:

  otherRequiredError: "Please enter the other value.",
survey-library Bug react: content question in custom question (component) is not reactive

The following component doesn't work in react.

Survey
    .ComponentCollection
    .Instance
    .add({
        //Unique component name. It becomes a new question type. Please note, it should be written in lowercase.
        name: "country",
        //The text that shows on toolbox
        title: "Country",
        //The actual question that will do the job
        questionJSON: {
            type: "dropdown",
            optionsCaption: "Select a country...",
            choicesByUrl: {
                url: "https://surveyjs.io/api/CountriesExample"
            }
        }
    });    

On loading choices from web, content question changed "visibleChoices" property, but content question is not reactive and nothing is changed.

survey-library Bug Do not run triggers in display mode

SurveyJS continue to run triggers in display mode (survey.mode="display"). All triggers should be disabled.

survey-library Bug Wrong render for footer actions in matrix with vertical columns

image

survey-library Bug "Preview before complete" setting being ignored when auto navigating from completed pages

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

Reporting a bug

What is the current behavior?

Currently when you have the following options set on the survey. It will auto navigate to the next page after completing the questions and submit the data, but on the final page it won't respect the preview setting, and instead will go straight to completing the survey once the final question has been answered.

{
  "sendResultOnPageNext": true,
  "goNextPageAutomatic": true,
  "showPreviewBeforeComplete": "showAnsweredQuestions"
}

What is the expected behavior?

I would expect one of two behaviours

  1. Submits nothing, and proceeds to the preview. It then fires the onComplete event when the user clicks complete.
  2. Fires of an onPartialSend event to save the current answer state, and proceeds to the preview. Then fires onComplete when the user clicks complete.

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

Using react-survey v1.8.71 I am able to recreate this behaviour using this simple survey JSON.

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "checkbox",
     "name": "question2",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question3",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  }
 ],
 "sendResultOnPageNext": true,
 "goNextPageAutomatic": true,
 "showPreviewBeforeComplete": "showAnsweredQuestions"
}

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

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

Specify your

  • browser: Brave
  • browser version: Version 1.30.87 Chromium: 94.0.4606.71 (Official Build) (64-bit)
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.8.71
survey-library Bug maxSize property is serializied with default value in file question

The following code should show in console {name: "q1"}.

const fileQuestion = new Survey.QuestionFile("q1");
console.log(fileQuestion.toJSON());

However it shows: {name: "q1", maxSize: 0}. maxSize should not be here.

survey-library Enhancement add isEqual() function into condition Operand class

We need the way to compare two expressions. These two expressions are equal: " == 1" and "=1", but we can't compare them as strings. It could be checked as:

const op1 = new ConditionsParser().parseExpression("{queston1} ==   1");
const op2 = new ConditionsParser().parseExpression("{queston1} =1");
console.log(op1.isEqual(op2)); //it returns true
survey-library Enhancement Cannot find module knockout

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

Bug

What is the current behavior?

Compiler is crashing with survey-angular 1.8.71. The older version 1.8.68 was working fine.

Error: node_modules/survey-angular/survey.angular.d.ts:9:21 - error TS2307: Cannot find module 'knockout' or its corresponding type declarations.

9 import * as ko from "knockout";

What is the expected behavior?

Compiler should not crash

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

Use survey-angular and compile your project.

Specify your

  • browser: Chrome
  • browser version: latest
  • surveyjs platform (angular or react or jquery or knockout or vue): angular
  • surveyjs version: 1.8.71
survey-library Enhancement Add survey onVariableChanged event
  /**
   * The event is fired when setVariable function is called. It can be called on changing a calculated value.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.name` - the variable name that has been changed.
   * <br/> `options.value` - a new value.
   * @see setVariable
   * @see onValueChanged
   * @see calculatedValues
   */
  public onVariableChanged: EventBase<SurveyModel> = this.addEvent<SurveyModel>();

survey-library Enhancement Add ability to customize css classes for an individual choice item

We do not have an easy way to override css classes for an individual choice item.

  /**
   * The event is fired before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - a question where choice item is rendered.
   * <br/> `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.item.text
   * <br/> `options.css` - a string with css classes divided by space. You can change it.
   */
   public onUpdateChoiceItemCss: EventBase<SurveyModel>

Here is the example of using. The example adds a new class for a negative values:

survey.onUpdateChoiceItemCss.add((sender, options) => {
    if(options.item.value < 0) {
      options.css = options.css + " negative_value";
    }
});

Version: v1.8.72, released at Tuesday, October 12, 2021, Total Issue Count: 10

Product
survey-library
Type
Enhancement
Description
Change Default Error Required Text (make it more English)

Base proposal is to change: "Please answer the question." to "Response required."

we have the following props:

  requiredError: "Please answer the question.",
  requiredErrorInPanel: "Please answer at least one question.",
  requiredInAllRowsError: "Please answer questions in all rows.",

Here the src: https://github.com/surveyjs/survey-library/blob/4084fc31e0773980d4a7621eb3d79ba4354172e8/src/localization/english.ts#L24

Another potential candidate is the following prop:

  otherRequiredError: "Please enter the other value.",

The following component doesn't work in react.

Survey
    .ComponentCollection
    .Instance
    .add({
        //Unique component name. It becomes a new question type. Please note, it should be written in lowercase.
        name: "country",
        //The text that shows on toolbox
        title: "Country",
        //The actual question that will do the job
        questionJSON: {
            type: "dropdown",
            optionsCaption: "Select a country...",
            choicesByUrl: {
                url: "https://surveyjs.io/api/CountriesExample"
            }
        }
    });    

On loading choices from web, content question changed "visibleChoices" property, but content question is not reactive and nothing is changed.

Product
survey-library
Type
Bug
Description
Do not run triggers in display mode

SurveyJS continue to run triggers in display mode (survey.mode="display"). All triggers should be disabled.

Product
survey-library
Type
Bug
Description
Wrong render for footer actions in matrix with vertical columns

image

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

Reporting a bug

What is the current behavior?

Currently when you have the following options set on the survey. It will auto navigate to the next page after completing the questions and submit the data, but on the final page it won't respect the preview setting, and instead will go straight to completing the survey once the final question has been answered.

{
  "sendResultOnPageNext": true,
  "goNextPageAutomatic": true,
  "showPreviewBeforeComplete": "showAnsweredQuestions"
}

What is the expected behavior?

I would expect one of two behaviours

  1. Submits nothing, and proceeds to the preview. It then fires the onComplete event when the user clicks complete.
  2. Fires of an onPartialSend event to save the current answer state, and proceeds to the preview. Then fires onComplete when the user clicks complete.

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

Using react-survey v1.8.71 I am able to recreate this behaviour using this simple survey JSON.

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question1",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  },
  {
   "name": "page2",
   "elements": [
    {
     "type": "checkbox",
     "name": "question2",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  },
  {
   "name": "page3",
   "elements": [
    {
     "type": "radiogroup",
     "name": "question3",
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    }
   ]
  }
 ],
 "sendResultOnPageNext": true,
 "goNextPageAutomatic": true,
 "showPreviewBeforeComplete": "showAnsweredQuestions"
}

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

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

Specify your

  • browser: Brave
  • browser version: Version 1.30.87 Chromium: 94.0.4606.71 (Official Build) (64-bit)
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.8.71
Product
survey-library
Type
Bug
Description
maxSize property is serializied with default value in file question

The following code should show in console {name: "q1"}.

const fileQuestion = new Survey.QuestionFile("q1");
console.log(fileQuestion.toJSON());

However it shows: {name: "q1", maxSize: 0}. maxSize should not be here.

Product
survey-library
Type
Enhancement
Description
add isEqual() function into condition Operand class

We need the way to compare two expressions. These two expressions are equal: " == 1" and "=1", but we can't compare them as strings. It could be checked as:

const op1 = new ConditionsParser().parseExpression("{queston1} ==   1");
const op2 = new ConditionsParser().parseExpression("{queston1} =1");
console.log(op1.isEqual(op2)); //it returns true
Product
survey-library
Type
Enhancement
Description
Cannot find module knockout

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

Bug

What is the current behavior?

Compiler is crashing with survey-angular 1.8.71. The older version 1.8.68 was working fine.

Error: node_modules/survey-angular/survey.angular.d.ts:9:21 - error TS2307: Cannot find module 'knockout' or its corresponding type declarations.

9 import * as ko from "knockout";

What is the expected behavior?

Compiler should not crash

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

Use survey-angular and compile your project.

Specify your

  • browser: Chrome
  • browser version: latest
  • surveyjs platform (angular or react or jquery or knockout or vue): angular
  • surveyjs version: 1.8.71
Product
survey-library
Type
Enhancement
Description
Add survey onVariableChanged event
  /**
   * The event is fired when setVariable function is called. It can be called on changing a calculated value.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.name` - the variable name that has been changed.
   * <br/> `options.value` - a new value.
   * @see setVariable
   * @see onValueChanged
   * @see calculatedValues
   */
  public onVariableChanged: EventBase<SurveyModel> = this.addEvent<SurveyModel>();

Product
survey-library
Type
Enhancement
Description
Add ability to customize css classes for an individual choice item

We do not have an easy way to override css classes for an individual choice item.

  /**
   * The event is fired before rendering a choice item in radiogroup, checkbox or dropdown questions. Use it to override the default choice item css.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - a question where choice item is rendered.
   * <br/> `options.item` - a choice item of ItemValue type. You can get value or text choice properties as options.item.value or options.item.text
   * <br/> `options.css` - a string with css classes divided by space. You can change it.
   */
   public onUpdateChoiceItemCss: EventBase<SurveyModel>

Here is the example of using. The example adds a new class for a negative values:

survey.onUpdateChoiceItemCss.add((sender, options) => {
    if(options.item.value < 0) {
      options.css = options.css + " negative_value";
    }
});

Version: v1.8.71, released at Thursday, October 7, 2021, Total Issue Count: 12

Product Type Description
survey-library Enhancement Warn if value is set in a disposed object
protected setPropertyValueCore(propertiesHash: any, name: string, val: any) {
    if (this.setPropertyValueCoreHandler) {
      if (!this.isDisposedValue) {
        this.setPropertyValueCoreHandler(propertiesHash, name, val);
      } else {
        // eslint-disable-next-line no-console
        console.warn("Attempt to set property '%s' of a disposed object %o", name, this);
      }
    }
    else propertiesHash[name] = val;
  }
survey-library Bug knockout: Refactor row rendering, use visibleElements

Use visibleElements in rendering instead of "elements" and "element.isVisible" property. It fixes the issue in Creator V2 and we use "visibleElements" in React and Vue.

survey-library Enhancement Introduce skeleton placeholder for lazy rendered rows

This will allow to have adequate scrollbar state for long surveys with invisible elements. Sometimes small scrollers lead to misunderstanding whether a view has another elements below view port.

See also https://github.com/surveyjs/survey-creator/issues/1822

survey-library Enhancement Add ability to have different question types in a column in matrices (dynamic/dropdown)

Introduce the following new event into Survey.

  /**
   * The event is fired before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - the matrix question.
   * <br/> `options.cellType` - the cell question type. You can change it.
   * <br/> `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
   * <br/> `options.column` - the matrix column object.
   * <br/> `options.columnName` - the matrix column name.
   * <br/> `options.row` - the matrix row object.
   * @see onMatrixBeforeRowAdded
   * @see onMatrixCellCreated
   * @see QuestionMatrixDynamicModel
   * @see QuestionMatrixDropdownModel
   */
   public onMatrixCellCreating: EventBase<SurveyModel>

Example of using in "bloodtest" dropdown matrix :

//Create "text" question for several rows in "value" column
survey.onMatrixCellCreating.add((sender, options) => {
  if(options.question.name !== "bloodtest" && options.column.name !== "value") return;
  //The default cellType is dropdown, we need text type for several rows.
  if(["Hemoglobin", "Ultrasound"].indexOf(options.row.rowName) > -1) {
     options.cellType = "text";
  }
});
//Setup cell questions after their creation
survey.onMatrixCellCreated.add((sender, options) => {
  if(options.question.name !== "bloodtest" && options.column.name !== "value") return;
  if(options.row.rowName == "Vitamin level") options.cellQuestion.choices = ["level 1", "level 2", "level 3"];
  if(options.row.rowName == "kidney") options.cellQuestion.choices = ["normal", "abnormal", "positive", "negative"];
});
survey-library Enhancement Hide selectAllText property for checkbox question if hasSelectAll is false

We need to add visibleIf attribute for "selectAllText" property to hide it if "hasSelectAll" property is false.

survey-library Bug survey-vue warnings: "Duplicate keys detected: 'nav1'

for an app developed last year, without significant changes to our code, since updating survey-vue from 1.8.13 to 1.8.70 these messages have started to appear in the console log:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Duplicate keys detected: 'nav1'. This may cause an update error.

found in

---> <Survey> at src/vue/survey.vue
       <Survey> at src/pages/Survey.vue
         <App> at src/App.vue
           <Root>

the messages cause no harm (the app works well)

we tried a naÏve fix by adding distinct id fields in the page array objects in the survey config JSON, but that did not help

we can share the code in a DM (its open source although not yet on a public repo) or bisect it to a narrower version range ...

survey-library Enhancement Introduce updater for dependent model properties

Sometimes model properties are calculated from other model properties from the same or other objects. In this case we need to subscribe their changes using the onPropertyChanged event or registerFunctionOnPropertyValueChanged method. I'd like to simplify this and create a helper object incapsulating this functionality:

  const base1 = new BaseTester1();
  const base2 = new BaseTester2();
  const base3 = new BaseTester3();
  const updater = new ComputedUpdater<number>(() => {
    return base1.propA + base2.propB;
  });
  base3.propC = <any>updater;
survey-library Bug Expression "3 * 0.6" returns incorrect value

We are using JavaScript floating operation and it doesn't work as expected. Here is the related issue, Our expression engine should fix it manually.

survey-library Bug Update comment and other text html element value after trimming

SurveyJS trim the question comment and other text. However, html element, text area still have white spaces. These spaces should be disappeared on loosing text area element focus.

survey-library Bug Matrix dropdown question getDisplayText doesn't work for filtered rows

If rows are filtered in matrix dropdown then "getDisplayText" function returns incorrect value. It leads to errors in text pre-processing.

survey-creator Bug V1: question page property doesn't work in modal question editor

Creator with option showElementEditorAsPropertyGrid: false, when question editor shows as a modal window, changing question page property doesn't work. The bug was initially created in SurveyJS Support Forum.

survey-creator Bug Condition editor does not work after re-open in modal window with tabs

Version: v1.8.71, released at Thursday, October 7, 2021, Total Issue Count: 12

Product
survey-library
Type
Enhancement
Description
Warn if value is set in a disposed object
protected setPropertyValueCore(propertiesHash: any, name: string, val: any) {
    if (this.setPropertyValueCoreHandler) {
      if (!this.isDisposedValue) {
        this.setPropertyValueCoreHandler(propertiesHash, name, val);
      } else {
        // eslint-disable-next-line no-console
        console.warn("Attempt to set property '%s' of a disposed object %o", name, this);
      }
    }
    else propertiesHash[name] = val;
  }
Product
survey-library
Type
Bug
Description
knockout: Refactor row rendering, use visibleElements

Use visibleElements in rendering instead of "elements" and "element.isVisible" property. It fixes the issue in Creator V2 and we use "visibleElements" in React and Vue.

Product
survey-library
Type
Enhancement
Description
Introduce skeleton placeholder for lazy rendered rows

This will allow to have adequate scrollbar state for long surveys with invisible elements. Sometimes small scrollers lead to misunderstanding whether a view has another elements below view port.

See also https://github.com/surveyjs/survey-creator/issues/1822

Introduce the following new event into Survey.

  /**
   * The event is fired before creating cell question in the matrix. You can change the cell question type by setting different options.cellType.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - the matrix question.
   * <br/> `options.cellType` - the cell question type. You can change it.
   * <br/> `options.rowValue` - the value of the current row. To access a particular column's value within the current row, use: `options.rowValue["columnValue"]`.
   * <br/> `options.column` - the matrix column object.
   * <br/> `options.columnName` - the matrix column name.
   * <br/> `options.row` - the matrix row object.
   * @see onMatrixBeforeRowAdded
   * @see onMatrixCellCreated
   * @see QuestionMatrixDynamicModel
   * @see QuestionMatrixDropdownModel
   */
   public onMatrixCellCreating: EventBase<SurveyModel>

Example of using in "bloodtest" dropdown matrix :

//Create "text" question for several rows in "value" column
survey.onMatrixCellCreating.add((sender, options) => {
  if(options.question.name !== "bloodtest" && options.column.name !== "value") return;
  //The default cellType is dropdown, we need text type for several rows.
  if(["Hemoglobin", "Ultrasound"].indexOf(options.row.rowName) > -1) {
     options.cellType = "text";
  }
});
//Setup cell questions after their creation
survey.onMatrixCellCreated.add((sender, options) => {
  if(options.question.name !== "bloodtest" && options.column.name !== "value") return;
  if(options.row.rowName == "Vitamin level") options.cellQuestion.choices = ["level 1", "level 2", "level 3"];
  if(options.row.rowName == "kidney") options.cellQuestion.choices = ["normal", "abnormal", "positive", "negative"];
});
Product
survey-library
Type
Enhancement
Description
Hide selectAllText property for checkbox question if hasSelectAll is false

We need to add visibleIf attribute for "selectAllText" property to hide it if "hasSelectAll" property is false.

Product
survey-library
Type
Bug
Description
survey-vue warnings: "Duplicate keys detected: 'nav1'

for an app developed last year, without significant changes to our code, since updating survey-vue from 1.8.13 to 1.8.70 these messages have started to appear in the console log:

vue.runtime.esm.js?2b0e:619 [Vue warn]: Duplicate keys detected: 'nav1'. This may cause an update error.

found in

---> <Survey> at src/vue/survey.vue
       <Survey> at src/pages/Survey.vue
         <App> at src/App.vue
           <Root>

the messages cause no harm (the app works well)

we tried a naÏve fix by adding distinct id fields in the page array objects in the survey config JSON, but that did not help

we can share the code in a DM (its open source although not yet on a public repo) or bisect it to a narrower version range ...

Product
survey-library
Type
Enhancement
Description
Introduce updater for dependent model properties

Sometimes model properties are calculated from other model properties from the same or other objects. In this case we need to subscribe their changes using the onPropertyChanged event or registerFunctionOnPropertyValueChanged method. I'd like to simplify this and create a helper object incapsulating this functionality:

  const base1 = new BaseTester1();
  const base2 = new BaseTester2();
  const base3 = new BaseTester3();
  const updater = new ComputedUpdater<number>(() => {
    return base1.propA + base2.propB;
  });
  base3.propC = <any>updater;
Product
survey-library
Type
Bug
Description
Expression "3 * 0.6" returns incorrect value

We are using JavaScript floating operation and it doesn't work as expected. Here is the related issue, Our expression engine should fix it manually.

Product
survey-library
Type
Bug
Description
Update comment and other text html element value after trimming

SurveyJS trim the question comment and other text. However, html element, text area still have white spaces. These spaces should be disappeared on loosing text area element focus.

If rows are filtered in matrix dropdown then "getDisplayText" function returns incorrect value. It leads to errors in text pre-processing.

Product
survey-creator
Type
Bug
Description
V1: question page property doesn't work in modal question editor

Creator with option showElementEditorAsPropertyGrid: false, when question editor shows as a modal window, changing question page property doesn't work. The bug was initially created in SurveyJS Support Forum.

Version: v1.8.70, released at Wednesday, September 29, 2021, Total Issue Count: 2

Product Type Description
survey-library Bug Localization strings returns internal object on getJson()

LocalizationStrings class should return copy of it's object on "getJson()" function. Otherwise, on changing this object, developer can change internal value of LocalizationStrings instance.

survey-creator Bug Cannot Delete Ranking Question

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

Once we add a Ranking Question, Not able to delete it which is blocking the entire survey

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

Add A Ranking Question and Try to Delete it

Screenshots

image

Where in other Questions have the option to delete that question

image

Version: v1.8.70, released at Wednesday, September 29, 2021, Total Issue Count: 2

Product
survey-library
Type
Bug
Description
Localization strings returns internal object on getJson()

LocalizationStrings class should return copy of it's object on "getJson()" function. Otherwise, on changing this object, developer can change internal value of LocalizationStrings instance.

Product
survey-creator
Type
Bug
Description
Cannot Delete Ranking Question

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

Once we add a Ranking Question, Not able to delete it which is blocking the entire survey

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

Add A Ranking Question and Try to Delete it

Screenshots

image

Where in other Questions have the option to delete that question

image

Version: v1.8.69, released at Tuesday, September 28, 2021, Total Issue Count: 10

Product Type Description
survey-library Bug Detail panel is not read-only when matrix is read-only

Detail panel should react on changing it's matrix question "isReadOnly" property as well as cell questions do.

survey-library Bug Signagure pad internally uses valueChangedCallback

We shoud not use valueChangedCallback internally in our code, since it can be overriden in custom widgets and components.

survey-library Enhancement Introduce createItemValue into base select class

We need "createItemValue" function that will create a correct item value to avoid code duplication in Library and Creator V2. This function only creates a correct ItemValue class and do not add it into choices.

survey-library Bug survey.prevPage() function never returns true

survey.prevPage() function returns undefined instead of true.

survey-library Bug placeHolder is not rendered for items in Multiple Text questions

On loading the json like this:

{
    elements: [
      {
        type: "multipletext", name: "q1",
        items: [
          { name: "item1", placeHolder: "place holder" }
        ]
      }
    ]
  }

text question "renderedPlaceHolder" is not updated and equals to undefined.

survey-library Bug text question dataList can return undefined

The following JSON will generate exception on rendering, if survey.locale is not "fr". text question "dataList" property will return undefined instead of empty array.

{
 elements: [  {
     "type": "text",
     "name": "Question1",
     "dataList": {
      "fr": [
       "French DL-1, French DL-2"
      ]
     }
    } ]}
survey-library Bug Navigation issue with onProgressText callback and questionOrder - random

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

Reporting a bug.

What is the current behavior?

Add a listener to the onProgressText event. And suppose there are three pages and the questionOrder on page three is random. Then navigating with the next button from the second page is taking the user to the first page.

What is the expected behavior?

The next button on the second page should navigate to the third page.

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

plunker

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

Tested page URL: https://plnkr.co/edit/8R5rxSF456JD1mbf

Maybe checking SurveyModel.prototype.updateProgressText can help

Specify your

  • browser: chrome
  • browser version: 93
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.8.68
survey-library Bug React: Text question input doesn't respect "Enter" key
survey-library Bug On changing text question dataList onPropertyChanged is not fired

Bug was found on testing Creator V2. We do not update dataList property editor value on changing this property in code. The reason - onPropertyChanged event is not fired.

custom-widgets Bug tagbox doesn't remove items if value is number

Tagbox store value internally as string and as result indexof by question.value as array of number always return -1. We should not use indexof and write a custom code.

Version: v1.8.69, released at Tuesday, September 28, 2021, Total Issue Count: 10

Product
survey-library
Type
Bug
Description
Detail panel is not read-only when matrix is read-only

Detail panel should react on changing it's matrix question "isReadOnly" property as well as cell questions do.

Product
survey-library
Type
Bug
Description
Signagure pad internally uses valueChangedCallback

We shoud not use valueChangedCallback internally in our code, since it can be overriden in custom widgets and components.

Product
survey-library
Type
Enhancement
Description
Introduce createItemValue into base select class

We need "createItemValue" function that will create a correct item value to avoid code duplication in Library and Creator V2. This function only creates a correct ItemValue class and do not add it into choices.

Product
survey-library
Type
Bug
Description
survey.prevPage() function never returns true

survey.prevPage() function returns undefined instead of true.

Product
survey-library
Type
Bug
Description
placeHolder is not rendered for items in Multiple Text questions

On loading the json like this:

{
    elements: [
      {
        type: "multipletext", name: "q1",
        items: [
          { name: "item1", placeHolder: "place holder" }
        ]
      }
    ]
  }

text question "renderedPlaceHolder" is not updated and equals to undefined.

Product
survey-library
Type
Bug
Description
text question dataList can return undefined

The following JSON will generate exception on rendering, if survey.locale is not "fr". text question "dataList" property will return undefined instead of empty array.

{
 elements: [  {
     "type": "text",
     "name": "Question1",
     "dataList": {
      "fr": [
       "French DL-1, French DL-2"
      ]
     }
    } ]}

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

Reporting a bug.

What is the current behavior?

Add a listener to the onProgressText event. And suppose there are three pages and the questionOrder on page three is random. Then navigating with the next button from the second page is taking the user to the first page.

What is the expected behavior?

The next button on the second page should navigate to the third page.

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

plunker

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

Tested page URL: https://plnkr.co/edit/8R5rxSF456JD1mbf

Maybe checking SurveyModel.prototype.updateProgressText can help

Specify your

  • browser: chrome
  • browser version: 93
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.8.68
Product
survey-library
Type
Bug
Description
React: Text question input doesn't respect "Enter" key
Product
survey-library
Type
Bug
Description
On changing text question dataList onPropertyChanged is not fired

Bug was found on testing Creator V2. We do not update dataList property editor value on changing this property in code. The reason - onPropertyChanged event is not fired.

Product
custom-widgets
Type
Bug
Description
tagbox doesn't remove items if value is number

Tagbox store value internally as string and as result indexof by question.value as array of number always return -1. We should not use indexof and write a custom code.

Version: v1.8.68, released at Tuesday, September 21, 2021, Total Issue Count: 10

Product Type Description
survey-library Bug Question 'text' title does not highlight after answering in Vue

See example: https://surveyjs.io/Examples/Library?id=questiontype-text&platform=Vue&theme=modern Question titles do not highlight after answering questions.

survey-library Bug Async expression validators don't focus element when false at validation

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

Bug (maybe feature ?)

What is the current behavior?

In an async expression validator if the expression is false, survey won't scroll to the element on validation

What is the expected behavior?

On validation, the page should scroll up to the element with the invalid expression validator

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

create a survey with an element with an expression validator calling an async function with this.returnResult(false);, scroll down the page, press the complete button.

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

https://codesandbox.io/s/sparkling-flower-tdkbq?file=/index.js

Specify your

  • browser: chrome / FF
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.67
survey-library Bug Console warning in react in List component where items have icons

We render List items without key in react: icon and span. It produces the warning. It can be reproduce in Creator V2, react version.

survey-library Bug Started page is not rendered in react in versions: v1.8.66-67 in react

We started to check page.isVisible in react from v1.8.66 and it returns always false for started page. I have change this behavior and it started to return true. I check page.isStarted on avoiding to add started page into visiblePages array. Unit tests corrected, new added and a functional test added to make sure we do not break it again.

survey-library Bug VueJS: responsivity manager doesn't hide invisible actions

See the testCafe\components\list.ts functiuonal test for VueJS

survey-library Bug React TitleElement doesn't re-render on title element change in some cases

SurveyLocStringViewer doesn't react on changing props in componentDidUpdate function

survey-creator Bug Doesn't scroll to page on selecting it in page selector if screen is small: V2

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

Bug

What is the current behavior?

Page selection is not always focused through page navigation selector.

What is the expected behavior?

Selected page through page navigation selector should be focused.

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

  1. Open an empty designer page.
  2. Add three pages, each page having one radio button question.
  3. Through page navigation selector first select page 1, then select page 2 OR page 3. Page 2 OR 3 gets selected but is not focused on the screen.

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

Tested page URL: https://surveyjstest.azurewebsites.net//Examples/CreatorSinglePage?id=options&platform=ReactjsV2&theme=modern

Test code

your_code_here

Specify your

  • browser: Chrome Version 91.0.4472.124
  • editor version:
survey-creator Bug V2: Could not set expression in trigger in property grid

The expression is not updated on Apply on closing Popup Window.

survey-creator Bug IME bug
survey-creator Bug Item editor stay editable if property is readOnly

Version: v1.8.68, released at Tuesday, September 21, 2021, Total Issue Count: 10

Product
survey-library
Type
Bug
Description
Question 'text' title does not highlight after answering in Vue

See example: https://surveyjs.io/Examples/Library?id=questiontype-text&platform=Vue&theme=modern Question titles do not highlight after answering questions.

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

Bug (maybe feature ?)

What is the current behavior?

In an async expression validator if the expression is false, survey won't scroll to the element on validation

What is the expected behavior?

On validation, the page should scroll up to the element with the invalid expression validator

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

create a survey with an element with an expression validator calling an async function with this.returnResult(false);, scroll down the page, press the complete button.

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

https://codesandbox.io/s/sparkling-flower-tdkbq?file=/index.js

Specify your

  • browser: chrome / FF
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.67
Product
survey-library
Type
Bug
Description
Console warning in react in List component where items have icons

We render List items without key in react: icon and span. It produces the warning. It can be reproduce in Creator V2, react version.

We started to check page.isVisible in react from v1.8.66 and it returns always false for started page. I have change this behavior and it started to return true. I check page.isStarted on avoiding to add started page into visiblePages array. Unit tests corrected, new added and a functional test added to make sure we do not break it again.

Product
survey-library
Type
Bug
Description
VueJS: responsivity manager doesn't hide invisible actions

See the testCafe\components\list.ts functiuonal test for VueJS

SurveyLocStringViewer doesn't react on changing props in componentDidUpdate function

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

Bug

What is the current behavior?

Page selection is not always focused through page navigation selector.

What is the expected behavior?

Selected page through page navigation selector should be focused.

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

  1. Open an empty designer page.
  2. Add three pages, each page having one radio button question.
  3. Through page navigation selector first select page 1, then select page 2 OR page 3. Page 2 OR 3 gets selected but is not focused on the screen.

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

Tested page URL: https://surveyjstest.azurewebsites.net//Examples/CreatorSinglePage?id=options&platform=ReactjsV2&theme=modern

Test code

your_code_here

Specify your

  • browser: Chrome Version 91.0.4472.124
  • editor version:
Product
survey-creator
Type
Bug
Description
V2: Could not set expression in trigger in property grid

The expression is not updated on Apply on closing Popup Window.

Product
survey-creator
Type
Bug
Description
IME bug
Product
survey-creator
Type
Bug
Description
Item editor stay editable if property is readOnly

Version: v1.8.67, released at Friday, September 17, 2021, Total Issue Count: 2

Product Type Description
survey-library Bug Checkbox choices aren't being rendered after using fromJSON?

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

I am reporting a bug. Thanks!

What is the current behavior?

image

What is the expected behavior?

image

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

Load a page with choices into a PageModel via fromJSON

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

Tested page URL: https://codesandbox.io/s/modern-tdd-t2yvh?file=/src/SurveyComponent.jsx

Test code

import React, { Component } from "react";

import * as Survey from "survey-react";

import "survey-react/modern.css";
import "./index.css";

Survey.StylesManager.applyTheme("modern");

class SurveyComponent extends Component {
  render() {
    const json = {
      questions: [
        {
          type: "checkbox",
          name: "car",
          title: "What car are you driving?",
          isRequired: true,
          hasNone: true,
          colCount: 4,
          choices: [
            "Ford",
            "Vauxhall",
            "Volkswagen",
            "Nissan",
            "Audi",
            "Mercedes-Benz",
            "BMW",
            "Peugeot",
            "Toyota",
            "Citroen"
          ]
        }
      ]
    };
    const survey = new Survey.Model(json);

    // Serialize Page to JSON
    const pageModel = survey.pages[0];
    const pageJSON = pageModel.toJSON();

    // Remove Page
    survey.removePage(pageModel);

    // Re-add Page
    const pg = survey.addNewPage();
    pg.fromJSON(pageJSON);
    console.log(pageJSON);

    return <Survey.Survey model={survey} />;
  }
}

export default SurveyComponent;

Specify your

  • browser: Chrome
  • browser version: 93.0.4577.63 (Official Build)
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.65
survey-library Bug Declare allowRowsDragAndDrop property in matrix dynamic correctly

"allowRowsDragAndDrop" property is not declared correctly in matrix dynamic question.

Version: v1.8.67, released at Friday, September 17, 2021, Total Issue Count: 2

Product
survey-library
Type
Bug
Description
Checkbox choices aren't being rendered after using fromJSON?

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

I am reporting a bug. Thanks!

What is the current behavior?

image

What is the expected behavior?

image

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

Load a page with choices into a PageModel via fromJSON

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

Tested page URL: https://codesandbox.io/s/modern-tdd-t2yvh?file=/src/SurveyComponent.jsx

Test code

import React, { Component } from "react";

import * as Survey from "survey-react";

import "survey-react/modern.css";
import "./index.css";

Survey.StylesManager.applyTheme("modern");

class SurveyComponent extends Component {
  render() {
    const json = {
      questions: [
        {
          type: "checkbox",
          name: "car",
          title: "What car are you driving?",
          isRequired: true,
          hasNone: true,
          colCount: 4,
          choices: [
            "Ford",
            "Vauxhall",
            "Volkswagen",
            "Nissan",
            "Audi",
            "Mercedes-Benz",
            "BMW",
            "Peugeot",
            "Toyota",
            "Citroen"
          ]
        }
      ]
    };
    const survey = new Survey.Model(json);

    // Serialize Page to JSON
    const pageModel = survey.pages[0];
    const pageJSON = pageModel.toJSON();

    // Remove Page
    survey.removePage(pageModel);

    // Re-add Page
    const pg = survey.addNewPage();
    pg.fromJSON(pageJSON);
    console.log(pageJSON);

    return <Survey.Survey model={survey} />;
  }
}

export default SurveyComponent;

Specify your

  • browser: Chrome
  • browser version: 93.0.4577.63 (Official Build)
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.65
Product
survey-library
Type
Bug
Description
Declare allowRowsDragAndDrop property in matrix dynamic correctly

"allowRowsDragAndDrop" property is not declared correctly in matrix dynamic question.

Version: v1.8.66, released at Wednesday, September 15, 2021, Total Issue Count: 14

Product Type Description
survey-library Enhancement Add properties to customize File Question string constants
survey-library Enhancement Get rid of SortableJS in SurveyJS library

This will reduce the library size and hopeful fix the https://surveyjs.answerdesk.io/ticket/details/t6516/ranking-question-ranking-number issue

survey-library Enhancement Optionally replace h3/h4/h5 with span or setup the requred "hx"

Add into settings:

  titleTags: {
    survey: "h3",
    page: "h4",
    panel: "h4",
    question: "h5",
  }

and survey.onGetTitleTagName event. Here is the example:

survey.onGetTitleTagName.add((sender, options) => {
        //For elements inside panel use <h4> instead of <h3> for elements in the page root.
        const parent = options.element.parent;
        if (!!parent && parent.isPanel) {
            options.tagName = "h4";
        }
    });
survey-library Enhancement A11Y: Narrator reading the whole <a> tag
survey-library Bug React page use visible property to decide render or not instead of isVisible

The issue was found in SurveyJS Creator V2 and it reproduces when survey in design more or "survey.showInvisibleElements" property is set to "true". React Page component use "visible" property to check can it render or not, instead of "isVisible". The last is check survey design mode and "showInvisibleElements" property.

survey-library Bug Imagepicker localized images broken

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

Bug

What is the current behavior?

It seems the image options are not changed when the survey language changes.

What is the expected behavior?

Since the imageLink properties are localizable strings it makes sense that localizing them shows the correct image.

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

Change the language to german.

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

Tested on versions 1.8.56 (which we use atm) and on the online creator which uses the latest version.

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "imagepicker",
     "name": "question1",
     "choices": [
      {
       "value": "1",
       "text": {
        "default": "foto1_ENG",
        "de": "foto1_DE"
       },
       "imageLink": {
        "default": "https://cdn1.collecthor.nl/organisation8/surveys/2923/Header_2835493_16.9-1024x574.jpg",
        "de": "https://cdn1.collecthor.nl/organisation8/surveys/2923/Niko%20Bellic.jpg"
       }
      }
     ],
     "imageHeight": 450,
     "imageWidth": 600
    }
   ]
  }
 ]
}

### Specify your

* browser: chrome
* browser version: latest 
* surveyjs platform (angular or react or jquery or knockout or vue): knockout
* surveyjs version: > 1.8.56
survey-library Bug Place holder in text and comment questions are not updated on changing locale

We do not update "renderedPlaceHolder" property on changing survey locale. Unit test is missed on this case.

survey-library Enhancement layout of single-/multiple choice items with long text
survey-library Bug Incorrect proccess text that reference value getting from choices loaded from the web

The original bug was reported on SurveyJS Support Forum. If a dropdown question get choices from a web service, it has the value set before loading the choices from web service then text processing doesnt' work correctly. It is continue showing question value, instead of loading from web service item text.

survey-library Bug survey element onPropertyChanged doesn't call if values equals on caseInsensitive and trimming

"onPropertyChanged" event should be called when new value is different from old value without trimming and converting to lowcase.

survey-creator Bug Undo/Redo works incorrectly on changing question type in V1

We need to put in one transaction changing question type operation. Right now it is divided on two operations: delete the old queston and insert a new question. As result the user has to click two times on "Undo"/"Redo" buttons to get the needed result.

It works fine in V2 and it is tested in V2.

survey-creator Enhancement Creator V2: Add creator.onCollectionItemAllowOperations event
/**
   * The event is called before rendering a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
   * You can make detail/edit and remove buttons invsible and/or disable editing.
   * <br/> sender the survey creator object that fires the event
   * <br/> options.obj the survey object: Question, Panel, Page or Survey
   * <br/> options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
   * <br/> options.propertyName the collection property name
   * <br/> options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
   * <br/> options.item the collection item that we are going to delete
   * <br/> options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
   * <br/> options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
   */
   public onCollectionItemAllowOperations: Survey.Event<(sender: Creator, options)>;

These events will work, but becomes obsolete: "creator.onCanDeleteItem" and "creator.onCollectionItemDeleting"

survey-creator Bug "None" item is not displayed when editing dropdown question items
survey-creator Bug V1: problem with moving questions from page to another page

Version: v1.8.66, released at Wednesday, September 15, 2021, Total Issue Count: 14

Product
survey-library
Type
Enhancement
Description
Add properties to customize File Question string constants
Product
survey-library
Type
Enhancement
Description
Get rid of SortableJS in SurveyJS library

This will reduce the library size and hopeful fix the https://surveyjs.answerdesk.io/ticket/details/t6516/ranking-question-ranking-number issue

Product
survey-library
Type
Enhancement
Description
Optionally replace h3/h4/h5 with span or setup the requred "hx"

Add into settings:

  titleTags: {
    survey: "h3",
    page: "h4",
    panel: "h4",
    question: "h5",
  }

and survey.onGetTitleTagName event. Here is the example:

survey.onGetTitleTagName.add((sender, options) => {
        //For elements inside panel use <h4> instead of <h3> for elements in the page root.
        const parent = options.element.parent;
        if (!!parent && parent.isPanel) {
            options.tagName = "h4";
        }
    });
Product
survey-library
Type
Enhancement
Description
A11Y: Narrator reading the whole <a> tag

The issue was found in SurveyJS Creator V2 and it reproduces when survey in design more or "survey.showInvisibleElements" property is set to "true". React Page component use "visible" property to check can it render or not, instead of "isVisible". The last is check survey design mode and "showInvisibleElements" property.

Product
survey-library
Type
Bug
Description
Imagepicker localized images broken

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

Bug

What is the current behavior?

It seems the image options are not changed when the survey language changes.

What is the expected behavior?

Since the imageLink properties are localizable strings it makes sense that localizing them shows the correct image.

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

Change the language to german.

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

Tested on versions 1.8.56 (which we use atm) and on the online creator which uses the latest version.

Test code

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "imagepicker",
     "name": "question1",
     "choices": [
      {
       "value": "1",
       "text": {
        "default": "foto1_ENG",
        "de": "foto1_DE"
       },
       "imageLink": {
        "default": "https://cdn1.collecthor.nl/organisation8/surveys/2923/Header_2835493_16.9-1024x574.jpg",
        "de": "https://cdn1.collecthor.nl/organisation8/surveys/2923/Niko%20Bellic.jpg"
       }
      }
     ],
     "imageHeight": 450,
     "imageWidth": 600
    }
   ]
  }
 ]
}

### Specify your

* browser: chrome
* browser version: latest 
* surveyjs platform (angular or react or jquery or knockout or vue): knockout
* surveyjs version: > 1.8.56

We do not update "renderedPlaceHolder" property on changing survey locale. Unit test is missed on this case.

Product
survey-library
Type
Enhancement
Description
layout of single-/multiple choice items with long text

The original bug was reported on SurveyJS Support Forum. If a dropdown question get choices from a web service, it has the value set before loading the choices from web service then text processing doesnt' work correctly. It is continue showing question value, instead of loading from web service item text.

"onPropertyChanged" event should be called when new value is different from old value without trimming and converting to lowcase.

Product
survey-creator
Type
Bug
Description
Undo/Redo works incorrectly on changing question type in V1

We need to put in one transaction changing question type operation. Right now it is divided on two operations: delete the old queston and insert a new question. As result the user has to click two times on "Undo"/"Redo" buttons to get the needed result.

It works fine in V2 and it is tested in V2.

Product
survey-creator
Type
Enhancement
Description
Creator V2: Add creator.onCollectionItemAllowOperations event
/**
   * The event is called before rendering a collection item from the Property Editor. For example: column in columns editor or item in choices and so on.
   * You can make detail/edit and remove buttons invsible and/or disable editing.
   * <br/> sender the survey creator object that fires the event
   * <br/> options.obj the survey object: Question, Panel, Page or Survey
   * <br/> options.property the collection property (Survey.JsonObjectProperty object). It has name, className, type, visible, readOnly and other properties
   * <br/> options.propertyName the collection property name
   * <br/> options.collection the editing collection where deleting item is located. It is can be columns in the matrices or choices in dropdown question and so on.
   * <br/> options.item the collection item that we are going to delete
   * <br/> options.allowDelete a boolean value. It is true by default. Set it false to abondome the element removing from the collection
   * <br/> options.allowEdit a boolean value. It is true by default. Set it false to disable editing.
   */
   public onCollectionItemAllowOperations: Survey.Event<(sender: Creator, options)>;

These events will work, but becomes obsolete: "creator.onCanDeleteItem" and "creator.onCollectionItemDeleting"

Product
survey-creator
Type
Bug
Description
"None" item is not displayed when editing dropdown question items
Product
survey-creator
Type
Bug
Description
V1: problem with moving questions from page to another page

Version: v1.8.65, released at Wednesday, September 8, 2021, Total Issue Count: 8

Product Type Description
survey-library Enhancement Randomize questions inside panel

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

Feature

What is the current behavior?

Currently questions can be randomized only per page (but the configuration can be set at a survey level as a default for each page).

What is the expected behavior?

I'd love to be able to randomize questions inside a panel.

survey-library Enhancement Library:Overview:isContainerReady

for panels and dynamic panels we have isContainerReady expression which described in our overview:

isContainerReady(nameOfPanelOrPage: string): Boolean

but in fact we could have the second panelIndex parameter and it should be also described in the overview.

check usage example here: https://github.com/surveyjs/survey-library/issues/3256

survey-library Enhancement Radiogroup accessibility issue
survey-library Enhancement Allow to override properties values for all properties in survey model

We have introduced a functionality over a year ago that gets the default value from the serializer if it is not provided in the "getPropertyValue" function. For example: If questionsOnPageMode property is not set then survey.getPropertyValue("questionsOnPageMode", "standard") and survey.getPropertyValue("questionsOnPageMode") will return the same value since the default value will be taken from property definition:

{
    name: "questionsOnPageMode",
    default: "standard",
    choices: ["singlePage", "standard", "questionPerPage"],
  }

If on getter we will remove the defualt value and will use: getPropertyValue("questionsOnPageMode") then developer will get the chance to modify the default value as: Survey.Serializer.findProperty("survey", "questionsOnPageMode").defaultValue = "singlePage";.

survey-library Enhancement Add currentYear() and getYear() functions into function factory

You can use the following functions in expressions: "getYear() < 2000)" and "currentYear() - getYear() > 21)"

survey-library Enhancement Add support isContainerReady for dynamic panel question

isContainerReady is working for a standard panel only. It is impossible to use it for dynamic panel question and it is hard to use it in expression for panels in dynamic panel question. The following JSON will work correctly from v1.8.65: "exp1" question check if the current panel is ready or not. We pass two parameters, panel dynamic question name and panel index, is the current index. "exp" question check if all panels in panel dynamic are ready. We pass panel dynamic question name only.

{
    elements: [
      {
        "type": "paneldynamic",
        "name": "panel1",
        "templateElements": [
          {
            "type": "text",
            "name": "q1",
            "isRequired": true
          },
          {
            "type": "expression",
            "name": "exp1",
            "expression": "isContainerReady('panel1', {panelIndex})",
          }
        ],
        "panelCount": 2,
      },
      {
        "type": "expression",
        "name": "exp2",
        "expression": "isContainerReady('panel1')",
      }
    ]
  }
survey-library Enhancement Add settings for SurveyJS expression and internal comparators and change behavior

SurveyJS doesnt' trim strings before compare them and compare them in case sensitive mode. Before "Abc " was not equal to " abc". From v1.8.65, by default, "Abc " becomes equal to " abc". You can revert the old behavior:

//" abc " will not equal to "abc". They are equal by default.
Survey.settings.comparator.trimStrings = false; //default value is true
 //"abc " will not equal to "Abc". They are equal by default.
Survey.settings.comparator.caseSensitive = true; //default value is false
survey-library Enhancement Enable custom component rendering in Action Bar dropdownlist

Version: v1.8.65, released at Wednesday, September 8, 2021, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Randomize questions inside panel

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

Feature

What is the current behavior?

Currently questions can be randomized only per page (but the configuration can be set at a survey level as a default for each page).

What is the expected behavior?

I'd love to be able to randomize questions inside a panel.

Product
survey-library
Type
Enhancement
Description
Library:Overview:isContainerReady

for panels and dynamic panels we have isContainerReady expression which described in our overview:

isContainerReady(nameOfPanelOrPage: string): Boolean

but in fact we could have the second panelIndex parameter and it should be also described in the overview.

check usage example here: https://github.com/surveyjs/survey-library/issues/3256

Product
survey-library
Type
Enhancement
Description
Radiogroup accessibility issue
Product
survey-library
Type
Enhancement
Description
Allow to override properties values for all properties in survey model

We have introduced a functionality over a year ago that gets the default value from the serializer if it is not provided in the "getPropertyValue" function. For example: If questionsOnPageMode property is not set then survey.getPropertyValue("questionsOnPageMode", "standard") and survey.getPropertyValue("questionsOnPageMode") will return the same value since the default value will be taken from property definition:

{
    name: "questionsOnPageMode",
    default: "standard",
    choices: ["singlePage", "standard", "questionPerPage"],
  }

If on getter we will remove the defualt value and will use: getPropertyValue("questionsOnPageMode") then developer will get the chance to modify the default value as: Survey.Serializer.findProperty("survey", "questionsOnPageMode").defaultValue = "singlePage";.

Product
survey-library
Type
Enhancement
Description
Add currentYear() and getYear() functions into function factory

You can use the following functions in expressions: "getYear() < 2000)" and "currentYear() - getYear() > 21)"

Product
survey-library
Type
Enhancement
Description
Add support isContainerReady for dynamic panel question

isContainerReady is working for a standard panel only. It is impossible to use it for dynamic panel question and it is hard to use it in expression for panels in dynamic panel question. The following JSON will work correctly from v1.8.65: "exp1" question check if the current panel is ready or not. We pass two parameters, panel dynamic question name and panel index, is the current index. "exp" question check if all panels in panel dynamic are ready. We pass panel dynamic question name only.

{
    elements: [
      {
        "type": "paneldynamic",
        "name": "panel1",
        "templateElements": [
          {
            "type": "text",
            "name": "q1",
            "isRequired": true
          },
          {
            "type": "expression",
            "name": "exp1",
            "expression": "isContainerReady('panel1', {panelIndex})",
          }
        ],
        "panelCount": 2,
      },
      {
        "type": "expression",
        "name": "exp2",
        "expression": "isContainerReady('panel1')",
      }
    ]
  }
Product
survey-library
Type
Enhancement
Description
Add settings for SurveyJS expression and internal comparators and change behavior

SurveyJS doesnt' trim strings before compare them and compare them in case sensitive mode. Before "Abc " was not equal to " abc". From v1.8.65, by default, "Abc " becomes equal to " abc". You can revert the old behavior:

//" abc " will not equal to "abc". They are equal by default.
Survey.settings.comparator.trimStrings = false; //default value is true
 //"abc " will not equal to "Abc". They are equal by default.
Survey.settings.comparator.caseSensitive = true; //default value is false
Product
survey-library
Type
Enhancement
Description
Enable custom component rendering in Action Bar dropdownlist

Version: v1.8.64, released at Tuesday, August 31, 2021, Total Issue Count: 8

Product Type Description
survey-library Enhancement Allow to customize component display value output

See the https://surveyjs.answerdesk.io/internal/ticket/details/T7597 thread for more details

Using the FullName component control example, this is the survey result that gets output normally:

image

As you can see, the Display Value field is the same as the Answer Value, the serialized result data. I would like to format the Display Value field in such a way to provide a more customer friendly result, here is an example of what I would be trying to do: image

survey-library Bug Default value doesn't work correctly in composite component question

The following composite component doesn't work correctly. We expect to have "bool" question equals false and "firstName" "Jon", however, it clears "bool" or/and "firstName" question based on questions order.

Survey.ComponentCollection.Instance.add({
    name: "customerinfo",
    elementsJSON: [
      { type: "boolean", name: "bool", defaultValue: false },
      { type: "text", name: "firstName", defaultValue: "Jon" },
      { type: "text", name: "lastName" },
    ],
    onCreated(question: QuestionCustomModel) {
      const boolQuestion = question.contentPanel.getQuestionByName("bool");
      const firstQuestion = question.contentPanel.getQuestionByName("firstName");
      const lastQuestion = question.contentPanel.getQuestionByName("lastName");
      boolQuestion.valueChangedCallback = function() {
        if(boolQuestion.value === false) {
          firstQuestion.clearValue();
          lastQuestion.clearValue();
        }
      };
    }
  };
)
survey-library Bug survey.fromJSON() doesn't work if "pages" is missed.

The following code doesn't delete old pages:

survey.fromJSON(
  { elements: [{ type: "text", name: "q2" }] }
);

It is a short version the following code that works correctly:

survey.fromJSON(
  { pages: [ { elements: [{ type: "text", name: "q2" }] } ] }
);
survey-library Bug question.isAnswered and question.cssTitle do not update correctly

Initial value of cssTitle is incorrect and not answered question can contain css for answered question.

survey-creator Bug Next choice value doesn't generated correctly in several cases.

If last choice value is "a01" the new value will be "a2" instead of "a02" If last choice value is "abc1def2gkm3" the new value will be "item1" instead of "abc1def2gkm4".

It doesn't work correctly in V1 and V2

survey-pdf Enhancement Add the ability to hide borders in text questions
survey-pdf Bug Layout issue with "multi-columns" titles

Case 1) Page/panel title is "multi-column" and large enough to fill whole page:

image

Case 2) Selectbase question title large enough to fill whole page and colCount greater then 1:

image

Case 3?) Check survey title

survey-analytics Enhancement Support grouping of column questions for matrix dropdown into a single chart
var json = {
  "title": "question11",
  "pages": [
    {
      "name": "page2",
      "elements": [
        {
          "type": "matrixdropdown",
          "name": "question4",
          "title": "Please select the top 3 processes that you perceived as most difficult or troublesome.",
          "isRequired": true,
          "showHeader": false,
          "columns": [
            {
              "name": "1st Most Difficult",
              "isRequired": true
            },
            {
              "name": "2nd Most Difficult",
              "isRequired": true
            },
            {
              "name": "3rd Most Difficult",
              "isRequired": true
            }
          ],
          "choices": [
            "Process 1",
            "Process 2",
            "Process 3",
            "Process 4",
            "Process 5",
            "Process 6"
          ],
          "rows": [
            "Process"
          ]
        }
      ]
    }
  ]
};

We get the following visualization for matrix dropdown: image It shows a separate visualizer for each column

We need to support grouping data into a single chart: image

Version: v1.8.64, released at Tuesday, August 31, 2021, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Allow to customize component display value output

See the https://surveyjs.answerdesk.io/internal/ticket/details/T7597 thread for more details

Using the FullName component control example, this is the survey result that gets output normally:

image

As you can see, the Display Value field is the same as the Answer Value, the serialized result data. I would like to format the Display Value field in such a way to provide a more customer friendly result, here is an example of what I would be trying to do: image

Product
survey-library
Type
Bug
Description
Default value doesn't work correctly in composite component question

The following composite component doesn't work correctly. We expect to have "bool" question equals false and "firstName" "Jon", however, it clears "bool" or/and "firstName" question based on questions order.

Survey.ComponentCollection.Instance.add({
    name: "customerinfo",
    elementsJSON: [
      { type: "boolean", name: "bool", defaultValue: false },
      { type: "text", name: "firstName", defaultValue: "Jon" },
      { type: "text", name: "lastName" },
    ],
    onCreated(question: QuestionCustomModel) {
      const boolQuestion = question.contentPanel.getQuestionByName("bool");
      const firstQuestion = question.contentPanel.getQuestionByName("firstName");
      const lastQuestion = question.contentPanel.getQuestionByName("lastName");
      boolQuestion.valueChangedCallback = function() {
        if(boolQuestion.value === false) {
          firstQuestion.clearValue();
          lastQuestion.clearValue();
        }
      };
    }
  };
)
Product
survey-library
Type
Bug
Description
survey.fromJSON() doesn't work if "pages" is missed.

The following code doesn't delete old pages:

survey.fromJSON(
  { elements: [{ type: "text", name: "q2" }] }
);

It is a short version the following code that works correctly:

survey.fromJSON(
  { pages: [ { elements: [{ type: "text", name: "q2" }] } ] }
);
Product
survey-library
Type
Bug
Description
question.isAnswered and question.cssTitle do not update correctly

Initial value of cssTitle is incorrect and not answered question can contain css for answered question.

Product
survey-creator
Type
Bug
Description
Next choice value doesn't generated correctly in several cases.

If last choice value is "a01" the new value will be "a2" instead of "a02" If last choice value is "abc1def2gkm3" the new value will be "item1" instead of "abc1def2gkm4".

It doesn't work correctly in V1 and V2

Product
survey-pdf
Type
Enhancement
Description
Add the ability to hide borders in text questions
Product
survey-pdf
Type
Bug
Description
Layout issue with "multi-columns" titles

Case 1) Page/panel title is "multi-column" and large enough to fill whole page:

image

Case 2) Selectbase question title large enough to fill whole page and colCount greater then 1:

image

Case 3?) Check survey title

Product
survey-analytics
Type
Enhancement
Description
Support grouping of column questions for matrix dropdown into a single chart
var json = {
  "title": "question11",
  "pages": [
    {
      "name": "page2",
      "elements": [
        {
          "type": "matrixdropdown",
          "name": "question4",
          "title": "Please select the top 3 processes that you perceived as most difficult or troublesome.",
          "isRequired": true,
          "showHeader": false,
          "columns": [
            {
              "name": "1st Most Difficult",
              "isRequired": true
            },
            {
              "name": "2nd Most Difficult",
              "isRequired": true
            },
            {
              "name": "3rd Most Difficult",
              "isRequired": true
            }
          ],
          "choices": [
            "Process 1",
            "Process 2",
            "Process 3",
            "Process 4",
            "Process 5",
            "Process 6"
          ],
          "rows": [
            "Process"
          ]
        }
      ]
    }
  ]
};

We get the following visualization for matrix dropdown: image It shows a separate visualizer for each column

We need to support grouping data into a single chart: image

Version: v1.8.63, released at Saturday, August 28, 2021, Total Issue Count: 1

Product Type Description
survey-library Enhancement Create panel footerActions property

Add footerActions into panel. Refactor and replace code with "Edit" button for canceling preview, by rendering this button on footerActions. For: https://github.com/surveyjs/survey-creator/issues/1655

Version: v1.8.63, released at Saturday, August 28, 2021, Total Issue Count: 1

Product
survey-library
Type
Enhancement
Description
Create panel footerActions property

Add footerActions into panel. Refactor and replace code with "Edit" button for canceling preview, by rendering this button on footerActions. For: https://github.com/surveyjs/survey-creator/issues/1655

Version: v1.8.62, released at Wednesday, August 25, 2021, Total Issue Count: 8

Product Type Description
survey-library Enhancement Implement CssClassBuilder

Implement CssClassBuilder class to refactor code constructions like below:

var res =
  this.isFlowLayout && !this.isDesignMode
    ? cssClasses.flowRoot
    : cssClasses.mainRoot;
if (!res) res = "";
if (!this.isFlowLayout && this.hasTitleOnLeft && !!cssClasses.titleLeftRoot) {
  res += " " + cssClasses.titleLeftRoot;
}
if (this.errors.length > 0 && !!cssClasses.hasError) {
  res += " " + cssClasses.hasError;
}
if (cssClasses.small && !this.width) {
  res += " " + cssClasses.small;
}
return res;
survey-library Bug Vue: If a question becomes visible in row with several questions, it may not functional correctly

The following JSON will not work correctly in Vue.

{
        elements: [
          {
            type: "radiogroup",
            name: "q1",
            choices: [1, 2, 3],
          },
          {
            type: "radiogroup",
            name: "q2",
            startWithNewLine: false,
            visibleIf: "{q1} =2",
            choices: [1, 2, 3],
          },
          {
            type: "radiogroup",
            name: "q3",
            startWithNewLine: false,
            choices: [1, 2, 3],
          },
        ],
      }
survey-library Bug Some .d.ts files contain "survey-core" inline imports

See the https://surveyjs.answerdesk.io/ticket/details/t7581/survey-vue-1-8-61-property-trimvalue-is-protected-but-type-base-is-not-a-class-derived thread for more details

getModel(): AdaptiveActionContainer<import("survey-core").Action, import("survey-core").IAction>;
survey-creator Enhancement Support showInToolbox attribute in Component

We show all components in Creator toolbox. We should allow to hide a component from toolbox if there is showInToolbox attribute set to false. If showInToolbox is set to true or undefined, then the component will be in the Creator toolbox.

  Survey.ComponentCollection.Instance.add({
    name: "hiddencomponent",
    showInToolbox: false, 
    questionJSON: { type: "dropdown", choices: [1, 2, 3, 4, 5] },
  });

survey-creator Bug Popover not closing while page scroll in creator V2
survey-creator Bug Needed a chevron in select/dropdowns
survey-creator Bug Toolbox items are misaligned if they have categories and isCompact = true

image

survey-analytics Enhancement Support datetime question type

analytics not showing date field values:

{ type: "text", inputType: "date", name: "..." }

Version: v1.8.62, released at Wednesday, August 25, 2021, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Implement CssClassBuilder

Implement CssClassBuilder class to refactor code constructions like below:

var res =
  this.isFlowLayout && !this.isDesignMode
    ? cssClasses.flowRoot
    : cssClasses.mainRoot;
if (!res) res = "";
if (!this.isFlowLayout && this.hasTitleOnLeft && !!cssClasses.titleLeftRoot) {
  res += " " + cssClasses.titleLeftRoot;
}
if (this.errors.length > 0 && !!cssClasses.hasError) {
  res += " " + cssClasses.hasError;
}
if (cssClasses.small && !this.width) {
  res += " " + cssClasses.small;
}
return res;

The following JSON will not work correctly in Vue.

{
        elements: [
          {
            type: "radiogroup",
            name: "q1",
            choices: [1, 2, 3],
          },
          {
            type: "radiogroup",
            name: "q2",
            startWithNewLine: false,
            visibleIf: "{q1} =2",
            choices: [1, 2, 3],
          },
          {
            type: "radiogroup",
            name: "q3",
            startWithNewLine: false,
            choices: [1, 2, 3],
          },
        ],
      }
Product
survey-library
Type
Bug
Description
Some .d.ts files contain "survey-core" inline imports

See the https://surveyjs.answerdesk.io/ticket/details/t7581/survey-vue-1-8-61-property-trimvalue-is-protected-but-type-base-is-not-a-class-derived thread for more details

getModel(): AdaptiveActionContainer<import("survey-core").Action, import("survey-core").IAction>;
Product
survey-creator
Type
Enhancement
Description
Support showInToolbox attribute in Component

We show all components in Creator toolbox. We should allow to hide a component from toolbox if there is showInToolbox attribute set to false. If showInToolbox is set to true or undefined, then the component will be in the Creator toolbox.

  Survey.ComponentCollection.Instance.add({
    name: "hiddencomponent",
    showInToolbox: false, 
    questionJSON: { type: "dropdown", choices: [1, 2, 3, 4, 5] },
  });

Product
survey-creator
Type
Bug
Description
Popover not closing while page scroll in creator V2
Product
survey-creator
Type
Bug
Description
Needed a chevron in select/dropdowns

image

Product
survey-analytics
Type
Enhancement
Description
Support datetime question type

analytics not showing date field values:

{ type: "text", inputType: "date", name: "..." }

Version: v1.8.61, released at Thursday, August 19, 2021, Total Issue Count: 2

Product Type Description
survey-library Bug The templateTitle property renders wrong in knockout on initial rendering

This issue was reproduced in the plunker image

This happens only in knockout version when survey.data is empty.

You can see the behavior in other frameworks in this plunker (Vue) image

survey-library Bug When and after going to a previous page, the transition between pages is not smooth anymore (react)

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

Bug

What is the current behavior?

On a survey if i answer a question, then go back the content disappear for a brief time, moving the buttons to the top, then the content reappears, this makes some kind of flickering. This effect persist on all page already visited but not on first render

Tthis comportment appeared in version 1.8.57 from what i have tested.

What is the expected behavior?

When navigating through already answered pages, the transition should stay smooth

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

Start a survey. anwser the first question. press back => flickering press next => flickering again

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

https://codesandbox.io/s/surveyjs-pose-test-forked-vn3z9?file=/src/index.js Test code

const model = new Survey.Model(questions);
const Example = () => <Survey.Survey id="survey" model={model} />;

ReactDOM.render(<Example />, document.getElementById('root'));

Specify your

  • browser: chrome
  • browser version: 92.0.4515.131
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.60

Version: v1.8.61, released at Thursday, August 19, 2021, Total Issue Count: 2

This issue was reproduced in the plunker image

This happens only in knockout version when survey.data is empty.

You can see the behavior in other frameworks in this plunker (Vue) image

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

Bug

What is the current behavior?

On a survey if i answer a question, then go back the content disappear for a brief time, moving the buttons to the top, then the content reappears, this makes some kind of flickering. This effect persist on all page already visited but not on first render

Tthis comportment appeared in version 1.8.57 from what i have tested.

What is the expected behavior?

When navigating through already answered pages, the transition should stay smooth

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

Start a survey. anwser the first question. press back => flickering press next => flickering again

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

https://codesandbox.io/s/surveyjs-pose-test-forked-vn3z9?file=/src/index.js Test code

const model = new Survey.Model(questions);
const Example = () => <Survey.Survey id="survey" model={model} />;

ReactDOM.render(<Example />, document.getElementById('root'));

Specify your

  • browser: chrome
  • browser version: 92.0.4515.131
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.60

Version: v1.8.60, released at Wednesday, August 18, 2021, Total Issue Count: 9

Product Type Description
survey-library Bug The first item on a rating question does not have a left border

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

Reporting a bug

What is the current behavior?

When in a survey in the standard CSS theme, on a rating question, the first rating item does not have a left border. This regressions seems to have been introduced in this commit

What is the expected behavior?

The first rating item should have a left border.

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

Place a rating question on a Survey with the standard CSS theme applied

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

Tested page URL:

https://surveyjs.io/Examples/Library?id=real-nps&platform=Reactjs&theme=default

Specify your

  • browser: Google Chrmoe
  • browser version: Version 92.0.4515.107 (Official Build) (arm64)
  • surveyjs platform (angular or react or jquery or knockout or vue): All
  • surveyjs version: 1.8.56
survey-library Bug React: remove subscription in matrix dynamic on row count changed

Matrix dynamic subscribes on row count changed or rendered table changed on componentDidMount() but doesn't unsubscribe on componentWillUnmount().

survey-library Enhancement Customize header progress buttons

Screen Shot 2021-08-03 at 1 40 39 PM

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

Question

How can you change the color of the button in the image. I've tried using custom CSS classes and theming. Practically all other colors can be changed, but I can't figure out how to change the progress button colors.

What is the current behavior?

The navigation buttons stay the same color.

What is the expected behavior?

The navigation buttons should change color.

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

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

Tested page URL:

Test code

Survey.StylesManager.applyTheme("bootstrap");

var defaultThemeColors = Survey.StylesManager.ThemeColors["default"];
defaultThemeColors["$main-color"] = "#0000FF";
defaultThemeColors["$main-hover-color"] = "#0000FF";
defaultThemeColors["$text-color"] = "#4a4a4a";
defaultThemeColors["$header-color"] = "#0000FF";

defaultThemeColors["$header-background-color"] = "#4a4a4a";
defaultThemeColors["$body-container-background-color"] = "#f8f8f8";

Survey.StylesManager.applyTheme();

I've also tried

Survey.StylesManager.applyTheme('modern');

var myCss = {
  progressButtonsListElementCurrent: 'primary-color',
};

This allows me to change the text color but not the circle color.

Specify your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: Latest
survey-library Bug When refreshing the page, others isn't cleared

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

question

What is the current behavior?

After refreshing the survey (when it is completed) using clear and render, the question that has others selected doesn't get cleared, even though all other questions are cleared. Taking the survey again and also choosing others, the text from before is still there.

What is the expected behavior?

When others is selected and there is some text, it should be cleared when the survey refreshes (completed).

Specify your

  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.57
survey-library Bug Setting properties like `pageNextText` does not rerender buttons

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

Bug / feature

What is the current behavior?

Setting button texts during the survey does not rerender the buttons.

What is the expected behavior?

I'd expect these changes to these properties to be reflected directly, similar to how setting locale would rerender the buttons. Alternatively, if this is not supported I'd expect an error when this is changed while the survey is running.

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

Run this code in your developer tools, assuming the survey instance is stored insurvey:

survey.pageNextText = 'Next(13)';

Specify your

  • browser: n/a
  • browser version: n/a
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.59
survey-library Bug Uncaught TypeError: Cannot read property 'length' of null on showPreview for invisible matrix with text processing

DEMO

https://survey.boomerangmessaging.com/test/#

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

BUG when completing

What is the current behavior?

When pressing the final complete button, the fields disable and there is no way to complete the form. The console log shows Uncaught TypeError: Cannot read property 'length' of null error

What is the expected behavior?

The form to go to the overview screen.

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

By taking the whole form

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

Tested page URL:

https://survey.boomerangmessaging.com/test/#

Test code

{
 title: "Lone Worker Demo Form",
 logoPosition: "none",
 completedHtml: "COMPLETED HTML HERE",
 pages: [
  {
   name: "On boarding",
   elements: [
    {
     type: "html",
     name: "start",
     html: "<img src=\"https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Artboard-1-copy-15.jpg\" />"
    }
   ],
   title: "On boarding"
  },
  {
   name: "Activation",
   elements: [
    {
     type: "imagepicker",
     name: "lone_worker_type",
     title: "Select a Lone Worker Type",
     valueName: "lone_worker_types",
     isRequired: true,
     requiredErrorText: "Select a lone worker type",
     choices: [
      {
       value: "public",
       text: "Lone Worker Public",
       imageLink: "https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Low-signal-icon-copy.png"
      },
      {
       value: "private",
       text: "Lone Worker Closed User Group",
       imageLink: "https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Maintains-personal-privacy-copy.png"
      }
     ],
     colCount: 2,
     imageHeight: 80,
     imageWidth: 80,
     showLabel: true
    },
    {
     type: "panel",
     name: "trigger_sms",
     elements: [
      {
       type: "dropdown",
       name: "activation_number",
       width: "49%",
       minWidth: "200px",
       maxWidth: "",
       title: "Choose Activation Number",
       hideNumber: true,
       isRequired: true,
       requiredErrorText: "Select an activation number",
       choices: [
        "0776459898",
        "0775198964",
        "0787464879"
       ],
       optionsCaption: "Select number"
      },
      {
       type: "text",
       name: "activation_keyword_sms",
       width: "49%",
       minWidth: "200px",
       maxWidth: "",
       startWithNewLine: false,
       title: "Activation Keyword",
       hideNumber: true,
       isRequired: true,
       requiredErrorText: "Specify an activation keyword",
       placeHolder: "Keyword",
       dataList: [
        "yes",
        "go",
        "start",
        "activate",
        "start"
       ]
      }
     ],
     visibleIf: "{lone_worker_types} notempty",
     title: "SMS Activation Trigger",
     description: "DESCRIPTION HERE NEEDED",
     isRequired: true,
     requiredErrorText: "Please configure your SMS activation",
     showNumber: true
    }
   ],
   title: "Lone Worker Activation",
   maxTimeToFinish: 2
  },
  {
   name: "Registration",
   elements: [
    {
     type: "html",
     name: "Activation Options",
     html: "<div class=\"sv_q_erbox\" style=\"border: 1px solid #007cba;  background-color: #dfedfc; color: #007cba;\">You have chosen <b>{lone_worker_types}</b> to be sent from <b>{activation_number}</b> with the activation keyphrase <b>{activation_keyword_sms}</b></div>"
    },
    {
     type: "comment",
     name: "registration_message",
     title: "Registration Message",
     description: "Message sent to a Lone Worker upon registration.  They will be asked to respond to this message to activate the lone Worker Session.",
     defaultValue: "Thank you for registering to [[customer_name]]’s lone worker monitoring service. Please reply to this message with your location to activate the lone worker session.  You will receive the first monitoring message immediately after replying to this message and every [[interval]] mins thereafter.",
     isRequired: true,
     requiredErrorText: "You need to specify a registration message",
     placeHolder: "Enter a custom registration message"
    },
    {
     type: "html",
     name: "Reg message info",
     startWithNewLine: false,
     hideNumber: true,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5><a href=\"#\" class=\"reset button\" style=\"padding: 10px;float: right;\">Reset Text</a>\n<ul>\n<li>[[customer_name]]</li>\n<li>[[interval]]</li>\n</ul>\n\n"
    },
    {
     type: "boolean",
     name: "registration_repeat",
     minWidth: "",
     maxWidth: "",
     title: "Repeat Message If No Response? ",
     description: "If the user fails to respond, we will repeat your message",
     isRequired: true,
     showTitle: true
    },
    {
     type: "matrixdropdown",
     name: "repeat_options",
     useDisplayValuesInTitle: false,
     visibleIf: "{registration_repeat} = true",
     minWidth: "",
     maxWidth: "",
     title: "Repeat Options",
     description: "This wait time will also be applied to the monitoring interval.",
     hideNumber: true,
     defaultValue: {
      "Repeat Options": {
       Repeat: 2,
       Times: 5
      },
      the_repeat_options: {
       option_repeat: 2,
       option_time: 5
      }
     },
     isRequired: true,
     requiredErrorText: "Repeat options are required",
     columns: [
      {
       name: "option_repeat",
       title: "Repeat X message times",
       cellType: "rating",
       isRequired: true
      },
      {
       name: "option_time",
       title: "Wait X mins between messages",
       cellType: "text",
       isRequired: true,
       validators: [
        {
         type: "numeric",
         minValue: 5
        }
       ],
       inputType: "number",
       step: 5
      }
     ],
     rows: [
      {
       value: "the_repeat_options",
       text: "   "
      }
     ]
    },
    {
     type: "boolean",
     name: "regitration_failure",
     minWidth: "",
     title: "Send Registration Failure Message?",
     description: "Send a notification to the Lone Worker telling them that they failed to respond in time",
     defaultValue: "true",
     isRequired: true,
     readOnly: true
    },
    {
     type: "comment",
     name: "regitration_failure_message",
     visibleIf: "{regitration_failure} = true",
     startWithNewLine: false,
     title: "Registration Failure Message",
     hideNumber: true,
     defaultValue: "As you failed to respond within the required period, you are NOT registered for lone worker monitoring. If you still wish to register, please start the process again.",
     isRequired: true,
     requiredErrorText: "Please specify a failure message",
     placeHolder: "Registration Failure Message"
    },
    {
     type: "boolean",
     name: "registration_notification",
     minWidth: "",
     title: "Notify System User(s) On Activation?",
     description: "Send a notification when the Lone Worker process is activated.",
     isRequired: true,
     requiredErrorText: "Do you want to notify system users?"
    },
    {
     type: "html",
     name: "registration_notification_contacts",
     visibleIf: "{registration_notification} = true",
     minWidth: "",
     html: "<h5>CONTACT SELECTION PANEL HERE</h5>"
    },
    {
     type: "comment",
     name: "registration_notification_message",
     visibleIf: "{registration_notification} = true",
     title: "Notification Message",
     description: "Description here and indication about values?  Notification will be sent via SMS",
     defaultValue: "The Lone worker monitoring service has been activated by [name] / [[number]] at [[date]] / [[time]]. The location provided is [[reply_content]]",
     isRequired: true,
     placeHolder: "Enter your notification content"
    }
   ],
   title: "Registration"
  },
  {
   name: "Monitoring",
   elements: [
    {
     type: "html",
     name: "Reg settings",
     visible: false,
     html: "1.{repeat_options.option_repeat} <br>\n2.{repeat_option.option_repeat}<br>\n3.{option_repeat.wayne}<br>\n4.{the_repeat_options.option_repeat} <br>\n5.{wayne.option_repeat}<br>\n6.{the_repeat_options.option_repeat}<br>\n6.{the_repeat_option.option_repeat}<br>\n7.{repeat_options.wayne.option_repeat}<br>\n8.{repeat_options.wayne}<br>\n9.{wayne.option_repeat}<br>\n10 --  {repeat_options.the_repeat_options.option_repeat}"
    },
    {
     type: "comment",
     name: "monitoring_content",
     title: "Monitoring Message Content",
     description: "After registration, the monitoring process will begin. Send the below message at your set intervals to your Lone Worker.",
     defaultValue: "This is [[customer_name]]’s lone worker monitoring service. Please reply with one of the following numbers:\n\n1 – I’m safe\n9 – I need urgent assistance\n0 – Log off from lone worker monitoring service\n8 – My location has changed (provide your new location)\n\nIf you fail to respond to this message, [[no_of_repeats]] further message(s) will be sent at [[interval]] mins intervals. If you do not reply with [[interval]] mins of the final message, a lone working incident will be created.",
     rows: 10,
     placeHolder: "Monitoring Message Content"
    },
    {
     type: "html",
     name: "monitoring_help",
     startWithNewLine: false,
     hideNumber: true,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5><a href=\"#\" class=\"reset button\" style=\"padding: 10px;float: right;\">Reset Text</a>\n<ul>\n<li>[[customer_name]]</li>\n<li>[[interval]]</li>\n<li>[[no_of_repeats]]</li>\n</ul>\n\n"
    },
    {
     type: "dropdown",
     name: "monitoring_frequncy",
     title: "Monitoring Frequency",
     description: "Specify how often you want to check on your Lone Worker",
     valueName: "monitoring_frequency",
     isRequired: true,
     requiredErrorText: "Monitoring Frequency is required",
     choices: [
      {
       value: "30",
       text: "Every 30 mins"
      },
      {
       value: "60",
       text: "Every 1 Hour"
      },
      {
       value: "120",
       text: "Every 2 Hours"
      },
      {
       value: "180",
       text: "Every 3 Hours"
      },
      {
       value: "240",
       text: "Every 4 Hours"
      },
      {
       value: "300",
       text: "Every 5 Hours"
      }
     ],
     hasOther: true,
     otherPlaceHolder: "Time in minutes",
     otherText: "Custom",
     otherErrorText: "Specify a custom time period",
     optionsCaption: "Monitoring Frequency"
    },
    {
     type: "boolean",
     name: "repeat_monitoring_message",
     title: "Repeat Monitoring Message If No Response?",
     isRequired: true
    },
    {
     type: "panel",
     name: "monitor_repeat",
     elements: [
      {
       type: "rating",
       name: "monitor_repeat_time",
       width: "50%",
       minWidth: "",
       startWithNewLine: false,
       title: "Repeat Message",
       description: "Will repeat {monitor_repeat} times",
       hideNumber: true,
       valueName: "monitor_repeat",
       defaultValue: 2,
       isRequired: true,
       requiredErrorText: "Repeat times required"
      },
      {
       type: "dropdown",
       name: "monitor_repeat_between",
       width: "50%",
       minWidth: "",
       startWithNewLine: false,
       title: "Time Between Messages",
       description: "Wait {monitor_time}",
       hideNumber: true,
       valueName: "monitor_time",
       defaultValue: "1",
       isRequired: true,
       requiredErrorText: "Time between messages is required",
       choices: [
        {
         value: "1",
         text: "5 Minutes"
        },
        {
         value: "2",
         text: "10 Minutes"
        },
        {
         value: "3",
         text: "15 Minutes"
        },
        {
         value: "4",
         text: "30 Minutes"
        },
        {
         value: "5",
         text: "45 Minutes"
        },
        {
         value: "6",
         text: "1 Hour"
        },
        {
         value: "7",
         text: "Custom"
        }
       ]
      }
     ],
     visibleIf: "{repeat_monitoring_message} = true",
     title: "Monitoring Repeat Options",
     startWithNewLine: false,
     width: "100%"
    }
   ],
   title: "Monitoring"
  },
  {
   name: "Escalation",
   elements: [
    {
     type: "html",
     name: "management_info",
     html: "<div class=\"sv_q_erbox\" style=\"border: 1px solid #007cba;  background-color: #dfedfc; color: #007cba;\">Monitoring messages will be sent every<b>{monitoring_frequency}</b> minutes.</div>"
    },
    {
     type: "comment",
     name: "escalation_message",
     useDisplayValuesInTitle: false,
     width: "70%",
     minWidth: "",
     title: "Incident Escalation Message",
     description: "Send a message if the Lone Worker Fails to check in to monitoring messages",
     defaultValue: "Lone worker [[name]] / [[number]], [[ref]], has failed to respond to the latest monitoring message sent on [[send_date]] / [[send_time]]. The last response received was at [[response_date]]  / [[response_time]] and the last location provided was [[location]]. Reply with:\n\n1 – The incident is being attended to – On scene\n2 – I will attend to the incident + ETA No. in Mins\n9 – Request back-up / assistance (Provide description of help required)\n0 – Lone worker is safe + Provide description of the situation / action taken – Close incident",
     isRequired: true,
     requiredErrorText: "You need to supply an escalation message",
     rows: 14,
     placeHolder: "Escalation Message"
    },
    {
     type: "html",
     name: "Escalation Tags",
     width: "30%",
     minWidth: "",
     startWithNewLine: false,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5>\n<ul>\n<li>[[name]]</li>\n<li>[[number]]</li>\n<li>[[ref]]</li>\n<li>[[send_date]]</li>\n<li>[[send_time]]</li>\n<li>[[response_date]]</li>\n<li>[[response_time]]</li>\n<li>[[location]]</li>\n</ul>\n\n\n"
    },
    {
     type: "checkbox",
     name: "escalate_channel",
     width: "100%",
     startWithNewLine: false,
     title: "Send Escalation Message Via",
     hideNumber: true,
     defaultValue: [
      "1"
     ],
     isRequired: true,
     requiredErrorText: "Escalation comms channel is required",
     choices: [
      {
       value: "1",
       text: "SMS"
      },
      {
       value: "2",
       text: "Email"
      },
      {
       value: "3",
       text: "Voice"
      }
     ],
     colCount: 4,
     hasSelectAll: true
    },
    {
     type: "dropdown",
     name: "escalate_time",
     title: "How Long To Wait Before Sending?",
     description: "If there is no response, wait this amount of time before escalating. This will be sent after the final monitor repeat message of {monitor_time}.",
     isRequired: true,
     requiredErrorText: "You need to specify a wait time",
     choices: [
      {
       value: "5",
       text: "5 Minutes"
      },
      {
       value: "10",
       text: "10 Minutes"
      },
      {
       value: "15",
       text: "15 Minutes"
      },
      {
       value: "20",
       text: "20 Minutes"
      },
      {
       value: "30",
       text: "30 Minutes"
      },
      {
       value: "40",
       text: "40 Minutes"
      },
      {
       value: "50",
       text: "50 Minutes"
      },
      {
       value: "60",
       text: "1 Hour"
      }
     ],
     hasOther: true,
     otherPlaceHolder: "Time in minutes",
     otherText: "Custom",
     otherErrorText: "Enter time in minutes",
     optionsCaption: "Choose a time"
    },
    {
     type: "checkbox",
     name: "escalate_notifications",
     title: "Who Should Be Notified?",
     defaultValue: [
      "person"
     ],
     choices: [
      {
       value: "person",
       text: "Lone Worker"
      },
      {
       value: "contact",
       text: "A Contact"
      },
      {
       value: "group",
       text: "A Group"
      },
      {
       value: "custom",
       text: "Custom User"
      }
     ],
     colCount: 4,
     selectAllText: "All"
    },
    {
     type: "html",
     name: "escalate_group",
     visibleIf: "{escalate_notifications} contains 'group'",
     html: "Group Selection HTML"
    },
    {
     type: "comment",
     name: "escalate_custom",
     visibleIf: "{escalate_notifications} contains 'custom'",
     title: "Custom Notification Entries",
     description: "Phone number or email addresses. One per line.",
     hideNumber: true,
     requiredErrorText: "Please specify custom users to be notified",
     placeHolder: "Phone number or email address"
    },
    {
     type: "comment",
     name: "escalation_update",
     title: "Escalation Update Message",
     description: "Description NEEDED here of what this is?",
     defaultValue: "An incident handler has responded to Lone worker incident [[ref]] regarding [[name]] / [[number]]. Response details:\n\n[[response_content]].",
     isRequired: true,
     requiredErrorText: "Escalation update message is required",
     placeHolder: "Escalation update message"
    },
    {
     type: "boolean",
     name: "escalate_stand_down",
     title: "Add A Stand Down Message?",
     description: "If the user responds during the escalation process, send a message?",
     isRequired: true,
     requiredErrorText: "Do you want to add a stand down message?"
    },
    {
     type: "comment",
     name: "escalate_stand_down_content",
     visibleIf: "{escalate_stand_down} = true",
     title: "Stand Down Message",
     description: "Description NEEDED here of what this is?",
     defaultValue: "Lone Worker [[name]] / [[number]], [[ref]] has now responded to confirm they are safe.  Anyone attending to this incident can now stand down.",
     isRequired: true,
     requiredErrorText: "The stand down message is required",
     placeHolder: "Escalation update message"
    }
   ],
   title: "Incident Management",
   navigationTitle: "Incident Management "
  }
 ],
 sendResultOnPageNext: true,
 showTitle: false,
 showPageTitles: false,
 showQuestionNumbers: "onPage",
 showProgressBar: "top",
 progressBarType: "buttons",
 previewText: "Confirm Settings",
 firstPageIsStarted: true,
 showPreviewBeforeComplete: "showAnsweredQuestions"
}

Specify your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue):
  • surveyjs version: Latest
survey-library Bug onCompleting event doesn't work on "complete" trigger

Hello,

I m trying to complete a survey, using the survey logic tab. In which when I m entering 123 to question 1 then on click of next button survey should handle Complete Survey action. it is working fine. But when I m providing it allowComplete to false, then also survey completes itself. On preview its working fine after our last bug fix onCompleting event doesn't work correctly in preview mode.

OnCompleting Event is getting triggered, but allowComplete false is not working

Plunker: https://plnkr.co/edit/92vxtHeOSljM7M87

survey-creator Enhancement Prepend translation export with UTF-8 BOM

Related in a sense to #910 .

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

Requesting a feature

What is the current behavior?

When you export translations to CSV containing UTF-8 characters, by default they display wrong in MS Excel. You can get around this by going to Data -> Get Data -> From Text -> select file -> select UTF-8 encoding -> complete wizard but that's a lot of steps for a user.

According to https://stackoverflow.com/a/155176/299313, if you prepend the output with a UTF-8 byte order mark, most versions of Excel will behave properly. Software that doesn't recognize the UTF-8 BOM will just display the characters  at the start of the file.

I tested adding the UTF-8 BOM to the file (via sed -i '1s/^/\xef\xbb\xbf/' survey_translation.csv thanks to this post) and it worked in Excel for Mac 16.51.

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

Simple survey schema:

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "text",
     "name": "question1",
     "title": {
      "default": "Question Name",
      "es": "nombre de la pregunta en español"
     }
    }
   ]
  }
 ]
}

By default, when I open that in Excel it looks like this: image

With the added BOM it looks like this in Excel: image

I also made some modifications to the translations in the BOM-prepended file and imported, and Import did work despite the BOM. ✅

Specify your

survey-creator Bug Logic tab: Could not delete triggers in the logic tab

The issue was reported in the SurveyJS Support Forum. It doesn't work in both versions: V1 and V2

Version: v1.8.60, released at Wednesday, August 18, 2021, Total Issue Count: 9

Product
survey-library
Type
Bug
Description
The first item on a rating question does not have a left border

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

Reporting a bug

What is the current behavior?

When in a survey in the standard CSS theme, on a rating question, the first rating item does not have a left border. This regressions seems to have been introduced in this commit

What is the expected behavior?

The first rating item should have a left border.

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

Place a rating question on a Survey with the standard CSS theme applied

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

Tested page URL:

https://surveyjs.io/Examples/Library?id=real-nps&platform=Reactjs&theme=default

Specify your

  • browser: Google Chrmoe
  • browser version: Version 92.0.4515.107 (Official Build) (arm64)
  • surveyjs platform (angular or react or jquery or knockout or vue): All
  • surveyjs version: 1.8.56
Product
survey-library
Type
Bug
Description
React: remove subscription in matrix dynamic on row count changed

Matrix dynamic subscribes on row count changed or rendered table changed on componentDidMount() but doesn't unsubscribe on componentWillUnmount().

Product
survey-library
Type
Enhancement
Description
Customize header progress buttons

Screen Shot 2021-08-03 at 1 40 39 PM

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

Question

How can you change the color of the button in the image. I've tried using custom CSS classes and theming. Practically all other colors can be changed, but I can't figure out how to change the progress button colors.

What is the current behavior?

The navigation buttons stay the same color.

What is the expected behavior?

The navigation buttons should change color.

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

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

Tested page URL:

Test code

Survey.StylesManager.applyTheme("bootstrap");

var defaultThemeColors = Survey.StylesManager.ThemeColors["default"];
defaultThemeColors["$main-color"] = "#0000FF";
defaultThemeColors["$main-hover-color"] = "#0000FF";
defaultThemeColors["$text-color"] = "#4a4a4a";
defaultThemeColors["$header-color"] = "#0000FF";

defaultThemeColors["$header-background-color"] = "#4a4a4a";
defaultThemeColors["$body-container-background-color"] = "#f8f8f8";

Survey.StylesManager.applyTheme();

I've also tried

Survey.StylesManager.applyTheme('modern');

var myCss = {
  progressButtonsListElementCurrent: 'primary-color',
};

This allows me to change the text color but not the circle color.

Specify your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: Latest
Product
survey-library
Type
Bug
Description
When refreshing the page, others isn't cleared

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

question

What is the current behavior?

After refreshing the survey (when it is completed) using clear and render, the question that has others selected doesn't get cleared, even though all other questions are cleared. Taking the survey again and also choosing others, the text from before is still there.

What is the expected behavior?

When others is selected and there is some text, it should be cleared when the survey refreshes (completed).

Specify your

  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.57
Product
survey-library
Type
Bug
Description
Setting properties like `pageNextText` does not rerender buttons

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

Bug / feature

What is the current behavior?

Setting button texts during the survey does not rerender the buttons.

What is the expected behavior?

I'd expect these changes to these properties to be reflected directly, similar to how setting locale would rerender the buttons. Alternatively, if this is not supported I'd expect an error when this is changed while the survey is running.

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

Run this code in your developer tools, assuming the survey instance is stored insurvey:

survey.pageNextText = 'Next(13)';

Specify your

  • browser: n/a
  • browser version: n/a
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.59

DEMO

https://survey.boomerangmessaging.com/test/#

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

BUG when completing

What is the current behavior?

When pressing the final complete button, the fields disable and there is no way to complete the form. The console log shows Uncaught TypeError: Cannot read property 'length' of null error

What is the expected behavior?

The form to go to the overview screen.

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

By taking the whole form

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

Tested page URL:

https://survey.boomerangmessaging.com/test/#

Test code

{
 title: "Lone Worker Demo Form",
 logoPosition: "none",
 completedHtml: "COMPLETED HTML HERE",
 pages: [
  {
   name: "On boarding",
   elements: [
    {
     type: "html",
     name: "start",
     html: "<img src=\"https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Artboard-1-copy-15.jpg\" />"
    }
   ],
   title: "On boarding"
  },
  {
   name: "Activation",
   elements: [
    {
     type: "imagepicker",
     name: "lone_worker_type",
     title: "Select a Lone Worker Type",
     valueName: "lone_worker_types",
     isRequired: true,
     requiredErrorText: "Select a lone worker type",
     choices: [
      {
       value: "public",
       text: "Lone Worker Public",
       imageLink: "https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Low-signal-icon-copy.png"
      },
      {
       value: "private",
       text: "Lone Worker Closed User Group",
       imageLink: "https://survey.boomerangmessaging.com/wp-content/uploads/2021/06/Maintains-personal-privacy-copy.png"
      }
     ],
     colCount: 2,
     imageHeight: 80,
     imageWidth: 80,
     showLabel: true
    },
    {
     type: "panel",
     name: "trigger_sms",
     elements: [
      {
       type: "dropdown",
       name: "activation_number",
       width: "49%",
       minWidth: "200px",
       maxWidth: "",
       title: "Choose Activation Number",
       hideNumber: true,
       isRequired: true,
       requiredErrorText: "Select an activation number",
       choices: [
        "0776459898",
        "0775198964",
        "0787464879"
       ],
       optionsCaption: "Select number"
      },
      {
       type: "text",
       name: "activation_keyword_sms",
       width: "49%",
       minWidth: "200px",
       maxWidth: "",
       startWithNewLine: false,
       title: "Activation Keyword",
       hideNumber: true,
       isRequired: true,
       requiredErrorText: "Specify an activation keyword",
       placeHolder: "Keyword",
       dataList: [
        "yes",
        "go",
        "start",
        "activate",
        "start"
       ]
      }
     ],
     visibleIf: "{lone_worker_types} notempty",
     title: "SMS Activation Trigger",
     description: "DESCRIPTION HERE NEEDED",
     isRequired: true,
     requiredErrorText: "Please configure your SMS activation",
     showNumber: true
    }
   ],
   title: "Lone Worker Activation",
   maxTimeToFinish: 2
  },
  {
   name: "Registration",
   elements: [
    {
     type: "html",
     name: "Activation Options",
     html: "<div class=\"sv_q_erbox\" style=\"border: 1px solid #007cba;  background-color: #dfedfc; color: #007cba;\">You have chosen <b>{lone_worker_types}</b> to be sent from <b>{activation_number}</b> with the activation keyphrase <b>{activation_keyword_sms}</b></div>"
    },
    {
     type: "comment",
     name: "registration_message",
     title: "Registration Message",
     description: "Message sent to a Lone Worker upon registration.  They will be asked to respond to this message to activate the lone Worker Session.",
     defaultValue: "Thank you for registering to [[customer_name]]’s lone worker monitoring service. Please reply to this message with your location to activate the lone worker session.  You will receive the first monitoring message immediately after replying to this message and every [[interval]] mins thereafter.",
     isRequired: true,
     requiredErrorText: "You need to specify a registration message",
     placeHolder: "Enter a custom registration message"
    },
    {
     type: "html",
     name: "Reg message info",
     startWithNewLine: false,
     hideNumber: true,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5><a href=\"#\" class=\"reset button\" style=\"padding: 10px;float: right;\">Reset Text</a>\n<ul>\n<li>[[customer_name]]</li>\n<li>[[interval]]</li>\n</ul>\n\n"
    },
    {
     type: "boolean",
     name: "registration_repeat",
     minWidth: "",
     maxWidth: "",
     title: "Repeat Message If No Response? ",
     description: "If the user fails to respond, we will repeat your message",
     isRequired: true,
     showTitle: true
    },
    {
     type: "matrixdropdown",
     name: "repeat_options",
     useDisplayValuesInTitle: false,
     visibleIf: "{registration_repeat} = true",
     minWidth: "",
     maxWidth: "",
     title: "Repeat Options",
     description: "This wait time will also be applied to the monitoring interval.",
     hideNumber: true,
     defaultValue: {
      "Repeat Options": {
       Repeat: 2,
       Times: 5
      },
      the_repeat_options: {
       option_repeat: 2,
       option_time: 5
      }
     },
     isRequired: true,
     requiredErrorText: "Repeat options are required",
     columns: [
      {
       name: "option_repeat",
       title: "Repeat X message times",
       cellType: "rating",
       isRequired: true
      },
      {
       name: "option_time",
       title: "Wait X mins between messages",
       cellType: "text",
       isRequired: true,
       validators: [
        {
         type: "numeric",
         minValue: 5
        }
       ],
       inputType: "number",
       step: 5
      }
     ],
     rows: [
      {
       value: "the_repeat_options",
       text: "   "
      }
     ]
    },
    {
     type: "boolean",
     name: "regitration_failure",
     minWidth: "",
     title: "Send Registration Failure Message?",
     description: "Send a notification to the Lone Worker telling them that they failed to respond in time",
     defaultValue: "true",
     isRequired: true,
     readOnly: true
    },
    {
     type: "comment",
     name: "regitration_failure_message",
     visibleIf: "{regitration_failure} = true",
     startWithNewLine: false,
     title: "Registration Failure Message",
     hideNumber: true,
     defaultValue: "As you failed to respond within the required period, you are NOT registered for lone worker monitoring. If you still wish to register, please start the process again.",
     isRequired: true,
     requiredErrorText: "Please specify a failure message",
     placeHolder: "Registration Failure Message"
    },
    {
     type: "boolean",
     name: "registration_notification",
     minWidth: "",
     title: "Notify System User(s) On Activation?",
     description: "Send a notification when the Lone Worker process is activated.",
     isRequired: true,
     requiredErrorText: "Do you want to notify system users?"
    },
    {
     type: "html",
     name: "registration_notification_contacts",
     visibleIf: "{registration_notification} = true",
     minWidth: "",
     html: "<h5>CONTACT SELECTION PANEL HERE</h5>"
    },
    {
     type: "comment",
     name: "registration_notification_message",
     visibleIf: "{registration_notification} = true",
     title: "Notification Message",
     description: "Description here and indication about values?  Notification will be sent via SMS",
     defaultValue: "The Lone worker monitoring service has been activated by [name] / [[number]] at [[date]] / [[time]]. The location provided is [[reply_content]]",
     isRequired: true,
     placeHolder: "Enter your notification content"
    }
   ],
   title: "Registration"
  },
  {
   name: "Monitoring",
   elements: [
    {
     type: "html",
     name: "Reg settings",
     visible: false,
     html: "1.{repeat_options.option_repeat} <br>\n2.{repeat_option.option_repeat}<br>\n3.{option_repeat.wayne}<br>\n4.{the_repeat_options.option_repeat} <br>\n5.{wayne.option_repeat}<br>\n6.{the_repeat_options.option_repeat}<br>\n6.{the_repeat_option.option_repeat}<br>\n7.{repeat_options.wayne.option_repeat}<br>\n8.{repeat_options.wayne}<br>\n9.{wayne.option_repeat}<br>\n10 --  {repeat_options.the_repeat_options.option_repeat}"
    },
    {
     type: "comment",
     name: "monitoring_content",
     title: "Monitoring Message Content",
     description: "After registration, the monitoring process will begin. Send the below message at your set intervals to your Lone Worker.",
     defaultValue: "This is [[customer_name]]’s lone worker monitoring service. Please reply with one of the following numbers:\n\n1 – I’m safe\n9 – I need urgent assistance\n0 – Log off from lone worker monitoring service\n8 – My location has changed (provide your new location)\n\nIf you fail to respond to this message, [[no_of_repeats]] further message(s) will be sent at [[interval]] mins intervals. If you do not reply with [[interval]] mins of the final message, a lone working incident will be created.",
     rows: 10,
     placeHolder: "Monitoring Message Content"
    },
    {
     type: "html",
     name: "monitoring_help",
     startWithNewLine: false,
     hideNumber: true,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5><a href=\"#\" class=\"reset button\" style=\"padding: 10px;float: right;\">Reset Text</a>\n<ul>\n<li>[[customer_name]]</li>\n<li>[[interval]]</li>\n<li>[[no_of_repeats]]</li>\n</ul>\n\n"
    },
    {
     type: "dropdown",
     name: "monitoring_frequncy",
     title: "Monitoring Frequency",
     description: "Specify how often you want to check on your Lone Worker",
     valueName: "monitoring_frequency",
     isRequired: true,
     requiredErrorText: "Monitoring Frequency is required",
     choices: [
      {
       value: "30",
       text: "Every 30 mins"
      },
      {
       value: "60",
       text: "Every 1 Hour"
      },
      {
       value: "120",
       text: "Every 2 Hours"
      },
      {
       value: "180",
       text: "Every 3 Hours"
      },
      {
       value: "240",
       text: "Every 4 Hours"
      },
      {
       value: "300",
       text: "Every 5 Hours"
      }
     ],
     hasOther: true,
     otherPlaceHolder: "Time in minutes",
     otherText: "Custom",
     otherErrorText: "Specify a custom time period",
     optionsCaption: "Monitoring Frequency"
    },
    {
     type: "boolean",
     name: "repeat_monitoring_message",
     title: "Repeat Monitoring Message If No Response?",
     isRequired: true
    },
    {
     type: "panel",
     name: "monitor_repeat",
     elements: [
      {
       type: "rating",
       name: "monitor_repeat_time",
       width: "50%",
       minWidth: "",
       startWithNewLine: false,
       title: "Repeat Message",
       description: "Will repeat {monitor_repeat} times",
       hideNumber: true,
       valueName: "monitor_repeat",
       defaultValue: 2,
       isRequired: true,
       requiredErrorText: "Repeat times required"
      },
      {
       type: "dropdown",
       name: "monitor_repeat_between",
       width: "50%",
       minWidth: "",
       startWithNewLine: false,
       title: "Time Between Messages",
       description: "Wait {monitor_time}",
       hideNumber: true,
       valueName: "monitor_time",
       defaultValue: "1",
       isRequired: true,
       requiredErrorText: "Time between messages is required",
       choices: [
        {
         value: "1",
         text: "5 Minutes"
        },
        {
         value: "2",
         text: "10 Minutes"
        },
        {
         value: "3",
         text: "15 Minutes"
        },
        {
         value: "4",
         text: "30 Minutes"
        },
        {
         value: "5",
         text: "45 Minutes"
        },
        {
         value: "6",
         text: "1 Hour"
        },
        {
         value: "7",
         text: "Custom"
        }
       ]
      }
     ],
     visibleIf: "{repeat_monitoring_message} = true",
     title: "Monitoring Repeat Options",
     startWithNewLine: false,
     width: "100%"
    }
   ],
   title: "Monitoring"
  },
  {
   name: "Escalation",
   elements: [
    {
     type: "html",
     name: "management_info",
     html: "<div class=\"sv_q_erbox\" style=\"border: 1px solid #007cba;  background-color: #dfedfc; color: #007cba;\">Monitoring messages will be sent every<b>{monitoring_frequency}</b> minutes.</div>"
    },
    {
     type: "comment",
     name: "escalation_message",
     useDisplayValuesInTitle: false,
     width: "70%",
     minWidth: "",
     title: "Incident Escalation Message",
     description: "Send a message if the Lone Worker Fails to check in to monitoring messages",
     defaultValue: "Lone worker [[name]] / [[number]], [[ref]], has failed to respond to the latest monitoring message sent on [[send_date]] / [[send_time]]. The last response received was at [[response_date]]  / [[response_time]] and the last location provided was [[location]]. Reply with:\n\n1 – The incident is being attended to – On scene\n2 – I will attend to the incident + ETA No. in Mins\n9 – Request back-up / assistance (Provide description of help required)\n0 – Lone worker is safe + Provide description of the situation / action taken – Close incident",
     isRequired: true,
     requiredErrorText: "You need to supply an escalation message",
     rows: 14,
     placeHolder: "Escalation Message"
    },
    {
     type: "html",
     name: "Escalation Tags",
     width: "30%",
     minWidth: "",
     startWithNewLine: false,
     html: "<h5 style=\"margin-bottom:5px\">Available Tokens</h5>\n<ul>\n<li>[[name]]</li>\n<li>[[number]]</li>\n<li>[[ref]]</li>\n<li>[[send_date]]</li>\n<li>[[send_time]]</li>\n<li>[[response_date]]</li>\n<li>[[response_time]]</li>\n<li>[[location]]</li>\n</ul>\n\n\n"
    },
    {
     type: "checkbox",
     name: "escalate_channel",
     width: "100%",
     startWithNewLine: false,
     title: "Send Escalation Message Via",
     hideNumber: true,
     defaultValue: [
      "1"
     ],
     isRequired: true,
     requiredErrorText: "Escalation comms channel is required",
     choices: [
      {
       value: "1",
       text: "SMS"
      },
      {
       value: "2",
       text: "Email"
      },
      {
       value: "3",
       text: "Voice"
      }
     ],
     colCount: 4,
     hasSelectAll: true
    },
    {
     type: "dropdown",
     name: "escalate_time",
     title: "How Long To Wait Before Sending?",
     description: "If there is no response, wait this amount of time before escalating. This will be sent after the final monitor repeat message of {monitor_time}.",
     isRequired: true,
     requiredErrorText: "You need to specify a wait time",
     choices: [
      {
       value: "5",
       text: "5 Minutes"
      },
      {
       value: "10",
       text: "10 Minutes"
      },
      {
       value: "15",
       text: "15 Minutes"
      },
      {
       value: "20",
       text: "20 Minutes"
      },
      {
       value: "30",
       text: "30 Minutes"
      },
      {
       value: "40",
       text: "40 Minutes"
      },
      {
       value: "50",
       text: "50 Minutes"
      },
      {
       value: "60",
       text: "1 Hour"
      }
     ],
     hasOther: true,
     otherPlaceHolder: "Time in minutes",
     otherText: "Custom",
     otherErrorText: "Enter time in minutes",
     optionsCaption: "Choose a time"
    },
    {
     type: "checkbox",
     name: "escalate_notifications",
     title: "Who Should Be Notified?",
     defaultValue: [
      "person"
     ],
     choices: [
      {
       value: "person",
       text: "Lone Worker"
      },
      {
       value: "contact",
       text: "A Contact"
      },
      {
       value: "group",
       text: "A Group"
      },
      {
       value: "custom",
       text: "Custom User"
      }
     ],
     colCount: 4,
     selectAllText: "All"
    },
    {
     type: "html",
     name: "escalate_group",
     visibleIf: "{escalate_notifications} contains 'group'",
     html: "Group Selection HTML"
    },
    {
     type: "comment",
     name: "escalate_custom",
     visibleIf: "{escalate_notifications} contains 'custom'",
     title: "Custom Notification Entries",
     description: "Phone number or email addresses. One per line.",
     hideNumber: true,
     requiredErrorText: "Please specify custom users to be notified",
     placeHolder: "Phone number or email address"
    },
    {
     type: "comment",
     name: "escalation_update",
     title: "Escalation Update Message",
     description: "Description NEEDED here of what this is?",
     defaultValue: "An incident handler has responded to Lone worker incident [[ref]] regarding [[name]] / [[number]]. Response details:\n\n[[response_content]].",
     isRequired: true,
     requiredErrorText: "Escalation update message is required",
     placeHolder: "Escalation update message"
    },
    {
     type: "boolean",
     name: "escalate_stand_down",
     title: "Add A Stand Down Message?",
     description: "If the user responds during the escalation process, send a message?",
     isRequired: true,
     requiredErrorText: "Do you want to add a stand down message?"
    },
    {
     type: "comment",
     name: "escalate_stand_down_content",
     visibleIf: "{escalate_stand_down} = true",
     title: "Stand Down Message",
     description: "Description NEEDED here of what this is?",
     defaultValue: "Lone Worker [[name]] / [[number]], [[ref]] has now responded to confirm they are safe.  Anyone attending to this incident can now stand down.",
     isRequired: true,
     requiredErrorText: "The stand down message is required",
     placeHolder: "Escalation update message"
    }
   ],
   title: "Incident Management",
   navigationTitle: "Incident Management "
  }
 ],
 sendResultOnPageNext: true,
 showTitle: false,
 showPageTitles: false,
 showQuestionNumbers: "onPage",
 showProgressBar: "top",
 progressBarType: "buttons",
 previewText: "Confirm Settings",
 firstPageIsStarted: true,
 showPreviewBeforeComplete: "showAnsweredQuestions"
}

Specify your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue):
  • surveyjs version: Latest
Product
survey-library
Type
Bug
Description
onCompleting event doesn't work on "complete" trigger

Hello,

I m trying to complete a survey, using the survey logic tab. In which when I m entering 123 to question 1 then on click of next button survey should handle Complete Survey action. it is working fine. But when I m providing it allowComplete to false, then also survey completes itself. On preview its working fine after our last bug fix onCompleting event doesn't work correctly in preview mode.

OnCompleting Event is getting triggered, but allowComplete false is not working

Plunker: https://plnkr.co/edit/92vxtHeOSljM7M87

Product
survey-creator
Type
Enhancement
Description
Prepend translation export with UTF-8 BOM

Related in a sense to #910 .

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

Requesting a feature

What is the current behavior?

When you export translations to CSV containing UTF-8 characters, by default they display wrong in MS Excel. You can get around this by going to Data -> Get Data -> From Text -> select file -> select UTF-8 encoding -> complete wizard but that's a lot of steps for a user.

According to https://stackoverflow.com/a/155176/299313, if you prepend the output with a UTF-8 byte order mark, most versions of Excel will behave properly. Software that doesn't recognize the UTF-8 BOM will just display the characters  at the start of the file.

I tested adding the UTF-8 BOM to the file (via sed -i '1s/^/\xef\xbb\xbf/' survey_translation.csv thanks to this post) and it worked in Excel for Mac 16.51.

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

Simple survey schema:

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "text",
     "name": "question1",
     "title": {
      "default": "Question Name",
      "es": "nombre de la pregunta en español"
     }
    }
   ]
  }
 ]
}

By default, when I open that in Excel it looks like this: image

With the added BOM it looks like this in Excel: image

I also made some modifications to the translations in the BOM-prepended file and imported, and Import did work despite the BOM. ✅

Specify your

Product
survey-creator
Type
Bug
Description
Logic tab: Could not delete triggers in the logic tab

The issue was reported in the SurveyJS Support Forum. It doesn't work in both versions: V1 and V2

Version: v1.8.59, released at Tuesday, August 3, 2021, Total Issue Count: 14

Product Type Description
survey-library Bug title actions produce error in IE11

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

Bug

What is the current behavior?

When opening page with survey in Internet Explorer 11, code in file src\knockout\components\action-bar\action-bar.ts (and probably same in src\knockout\components\progress\buttons.ts) in method ko.components.register(...) at line const container: HTMLDivElement = componentInfo.element.nextElementSibling; returns undefined container because IE do not expose nextElementSibling on comment nodes. ResponsivityManager then crashes at line this.resizeObserver.observe(this.container.parentElement);

What is the expected behavior?

Make code return container to pass to ResponsivityManager class

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

Go open page in IE 11 https://surveyjs.io/Examples/Library (you also need to polyfill object.assign and ResizeObserver)

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

Tested page URL: https://surveyjs.io/Examples/Library

Test code

your_code_here

Specify your

  • browser: IE 11
  • browser version: 11.0.9600.17498 update version 11.0.15
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.56
survey-library Bug Clear setValue for setvalue trigger can produce exception

The following code will produce null reference exception:

var trigger = new SurveyTriggerSetValue();
trigger.setValue = [1, 2, 3];
trigger.setValue = undefined;
survey-library Enhancement onPropertyValueChangedCallback fuction should calls not for owner and not for survey instance only

We are calling onPropertyValueChangedCallback function for survey only. However, we should call it for an object as well, if the callback was set.

survey-library Enhancement Reset setValue property on changing setToName property in setValue trigger at design time

We need to reset setValue property in Creator on changing setToName property in trigger instance.

survey-library Bug Override array value vs ordinary value in setPropertyValue

The following code doesn't work correctly:

var question = survey.getAllQuestions()[0];
question.setPropertyValue("testValue", [1, 2, 3]);
question.setPropertyValue("testValue", "abc");
console.log(question.getPropertyValue("testValue"));

Instead of "abc", the result will be ['a', 'b', 'c'] and it is incorrect.

survey-library Bug onCompleting event doesn't work correctly in preview mode.

If disable survey completing on this event:

    survey.onCompleting.add((sender, options) => {
      options.allowComplete = false;
    });

and the survey is current in the preview mode, then on clicking "Complete" button, the survey cancel the preview state and goes into "running" state, even if compelting is canceling on event. It should stay in "preview" mode.

survey-library Bug Do not call notification on setting the same value in select base renderedValue property

If a dropdown is used in a cell in matrix dynamic and it renders as select2, for example, then select2 calls several times dropdown renderedValue property with the same value. As result surveyjs fires onMatrixCellValueChanging event several times which is incorrect.

survey-library Enhancement Allow to run expression validator in expression question

Here is the survey JSON. There are two ratings question and expression that calculates their sum. There is a requirement that the sum should be exactly 10. For this task, it would be nice if expression question support expression validator. It doesn't support it in v1.8.58 and prior.

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "rating",
     "name": "q1",
     "rateMax": 10
    },
    {
     "type": "rating",
     "name": "q2",
     "rateMax": 10
    },
    {
     "type": "expression",
     "name": "q3",
     "validators": [
      {
       "type": "expression",
       "expression": "{q3} = 10"
      }
     ],
     "expression": "{q1} + {q2}"
    }
   ]
  }
 ]
}
survey-creator Bug Invisible pages are not disabled in page selector in Test tab

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

Requesting a old feature that used to exist.

What is the current behavior?

When I set some pages to visible and others to invisible, all of the names of the pages appear in the Test Tab's pulldown list as the same colour.

What is the expected behavior?

I was using a version of the survey creator from the 2018/2019 era. In this old version, in the Test Tab's invisible pages were greyed out while visible pages were black.

This feature was very useful for me to quickly check the actions on my current page would render invisible pages to visible. I could quickly click the pulldown tab and see that page names have switched from grey to black.

test_pulldown_old

We recently upgraded to v.1.8.52 and noticed this feature was gone. I also notice that v.1.8.57 on https://surveyjs.io/create-survey does the same thing as v.1.8.52.

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

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

Tested page URL:

Test code

your_code_here

Specify your

survey-creator Bug options showPageSelectorInToolbar and showDropdownPageSelector doesn't work in V1

Options showPageSelectorInToolbar and showDropdownPageSelector doesn't work correctly. Setting showDropdownPageSelector to false or showPageSelectorInToolbar to true doesn't hide page selector from page tool bar.

survey-analytics Bug In tabulator questions with dot in the name aren't binded

to reprocude:

var json = {
  questions: [
    {
      type: "radiogroup",
      name: "car.car",
      title: "What car are you driving?",
      isRequired: true,
      colCount: 4,
      choices: [
        "None",
        "Ford",
        "Vauxhall",
        "Volkswagen",
        "Nissan",
        "Audi",
        "Mercedes-Benz",
        "BMW",
        "Peugeot",
        "Toyota",
        "Citroen",
      ],
    },
  ],
};

var data = [
  {
    "car.car": "Audi",
  },
  {
    "car.car": "Ford",
  },
];

see https://github.com/olifolkerd/tabulator/issues/2911 and http://tabulator.info/docs/4.7/columns#field-nesting

survey-analytics Bug DataTables: warning: table id=DataTables_Table_0 - Requested unknown parameter
custom-widgets Bug Bootstrap-datepicker - Unable to set date with the widget

Assumption: The enhancement to datepicker in #257 released in milestone 1.8.50 breaks the ability to select a date from the widget.

From the online examples: https://surveyjs.io/Examples/Library?id=custom-widget-bootstrapdatepicker&platform=Knockoutjs&theme=modern

Everything is greyed out and cannot be selected.

Here is working sample (Plunker) with version 1.8.49: https://plnkr.co/edit/XMWrXqUyGXghFw1A

custom-widgets Bug EasyAutocomplete doesn't work with goNextPageAutomatic: true

Hi, the problem is that you use onSelectItemEvent to select the question value instead of onChooseEvent. This will automatically evaluate the question when hovering over any of the autocomplete options. https://github.com/surveyjs/custom-widgets/blob/master/src/easy-autocomplete.js#L77

Version: v1.8.59, released at Tuesday, August 3, 2021, Total Issue Count: 14

Product
survey-library
Type
Bug
Description
title actions produce error in IE11

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

Bug

What is the current behavior?

When opening page with survey in Internet Explorer 11, code in file src\knockout\components\action-bar\action-bar.ts (and probably same in src\knockout\components\progress\buttons.ts) in method ko.components.register(...) at line const container: HTMLDivElement = componentInfo.element.nextElementSibling; returns undefined container because IE do not expose nextElementSibling on comment nodes. ResponsivityManager then crashes at line this.resizeObserver.observe(this.container.parentElement);

What is the expected behavior?

Make code return container to pass to ResponsivityManager class

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

Go open page in IE 11 https://surveyjs.io/Examples/Library (you also need to polyfill object.assign and ResizeObserver)

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

Tested page URL: https://surveyjs.io/Examples/Library

Test code

your_code_here

Specify your

  • browser: IE 11
  • browser version: 11.0.9600.17498 update version 11.0.15
  • surveyjs platform (angular or react or jquery or knockout or vue): jquery
  • surveyjs version: 1.8.56
Product
survey-library
Type
Bug
Description
Clear setValue for setvalue trigger can produce exception

The following code will produce null reference exception:

var trigger = new SurveyTriggerSetValue();
trigger.setValue = [1, 2, 3];
trigger.setValue = undefined;

We are calling onPropertyValueChangedCallback function for survey only. However, we should call it for an object as well, if the callback was set.

We need to reset setValue property in Creator on changing setToName property in trigger instance.

Product
survey-library
Type
Bug
Description
Override array value vs ordinary value in setPropertyValue

The following code doesn't work correctly:

var question = survey.getAllQuestions()[0];
question.setPropertyValue("testValue", [1, 2, 3]);
question.setPropertyValue("testValue", "abc");
console.log(question.getPropertyValue("testValue"));

Instead of "abc", the result will be ['a', 'b', 'c'] and it is incorrect.

Product
survey-library
Type
Bug
Description
onCompleting event doesn't work correctly in preview mode.

If disable survey completing on this event:

    survey.onCompleting.add((sender, options) => {
      options.allowComplete = false;
    });

and the survey is current in the preview mode, then on clicking "Complete" button, the survey cancel the preview state and goes into "running" state, even if compelting is canceling on event. It should stay in "preview" mode.

If a dropdown is used in a cell in matrix dynamic and it renders as select2, for example, then select2 calls several times dropdown renderedValue property with the same value. As result surveyjs fires onMatrixCellValueChanging event several times which is incorrect.

Product
survey-library
Type
Enhancement
Description
Allow to run expression validator in expression question

Here is the survey JSON. There are two ratings question and expression that calculates their sum. There is a requirement that the sum should be exactly 10. For this task, it would be nice if expression question support expression validator. It doesn't support it in v1.8.58 and prior.

{
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "rating",
     "name": "q1",
     "rateMax": 10
    },
    {
     "type": "rating",
     "name": "q2",
     "rateMax": 10
    },
    {
     "type": "expression",
     "name": "q3",
     "validators": [
      {
       "type": "expression",
       "expression": "{q3} = 10"
      }
     ],
     "expression": "{q1} + {q2}"
    }
   ]
  }
 ]
}
Product
survey-creator
Type
Bug
Description
Invisible pages are not disabled in page selector in Test tab

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

Requesting a old feature that used to exist.

What is the current behavior?

When I set some pages to visible and others to invisible, all of the names of the pages appear in the Test Tab's pulldown list as the same colour.

What is the expected behavior?

I was using a version of the survey creator from the 2018/2019 era. In this old version, in the Test Tab's invisible pages were greyed out while visible pages were black.

This feature was very useful for me to quickly check the actions on my current page would render invisible pages to visible. I could quickly click the pulldown tab and see that page names have switched from grey to black.

test_pulldown_old

We recently upgraded to v.1.8.52 and noticed this feature was gone. I also notice that v.1.8.57 on https://surveyjs.io/create-survey does the same thing as v.1.8.52.

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

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

Tested page URL:

Test code

your_code_here

Specify your

Options showPageSelectorInToolbar and showDropdownPageSelector doesn't work correctly. Setting showDropdownPageSelector to false or showPageSelectorInToolbar to true doesn't hide page selector from page tool bar.

Product
survey-analytics
Type
Bug
Description
In tabulator questions with dot in the name aren't binded

to reprocude:

var json = {
  questions: [
    {
      type: "radiogroup",
      name: "car.car",
      title: "What car are you driving?",
      isRequired: true,
      colCount: 4,
      choices: [
        "None",
        "Ford",
        "Vauxhall",
        "Volkswagen",
        "Nissan",
        "Audi",
        "Mercedes-Benz",
        "BMW",
        "Peugeot",
        "Toyota",
        "Citroen",
      ],
    },
  ],
};

var data = [
  {
    "car.car": "Audi",
  },
  {
    "car.car": "Ford",
  },
];

see https://github.com/olifolkerd/tabulator/issues/2911 and http://tabulator.info/docs/4.7/columns#field-nesting

Product
custom-widgets
Type
Bug
Description
Bootstrap-datepicker - Unable to set date with the widget

Assumption: The enhancement to datepicker in #257 released in milestone 1.8.50 breaks the ability to select a date from the widget.

From the online examples: https://surveyjs.io/Examples/Library?id=custom-widget-bootstrapdatepicker&platform=Knockoutjs&theme=modern

Everything is greyed out and cannot be selected.

Here is working sample (Plunker) with version 1.8.49: https://plnkr.co/edit/XMWrXqUyGXghFw1A

Product
custom-widgets
Type
Bug
Description
EasyAutocomplete doesn't work with goNextPageAutomatic: true

Hi, the problem is that you use onSelectItemEvent to select the question value instead of onChooseEvent. This will automatically evaluate the question when hovering over any of the autocomplete options. https://github.com/surveyjs/custom-widgets/blob/master/src/easy-autocomplete.js#L77

Version: v1.8.58, released at Thursday, July 29, 2021, Total Issue Count: 16

Product Type Description
survey-library Enhancement Add SurveyElement isQuestion property

There is no easy way to find out is a survey element (SurveyElement class) is question or not. element.isQuestion should return 'true' if an element is a question.

survey-library Bug Null exception on showing preview in file question located in dynamic panel

If there is a file question located in a dynamic panel and file downloading/uploading using survey event then on setting survey into preview mode the exception is raised. The issue was reported on SurveyJS Support Forum.

survey-library Bug The first title action fired on pressing enter in a text editor

We render a title action button as default, as result any enter fires the action of this button.

survey-library Bug placeHolder is not updated immediately in text and comment on chaning

The following code will not change the rendering immediately: textQuestion.placeHolder = "Please type your name...";

survey-library Enhancement Improve question displayValue functionality
  1. If dropdown/radiogroup/checkboxes have choices with empty value, like new ItemValue("", "Empty") then displayValue should return "Empty" for a question with empty value.
  2. add displayValueCallback: (text: string): string callback function into question class to allow override the default behavior of displayValue property and getDisplayValue function
survey-library Bug Action ResponsivityManager works incorrectly with invisible actions

ResponsivityManager calcualtes space for invisible items and as result it leads to incorrect rendering.

survey-library Bug Calling clearIncorrectValues function in matrix cell will onMatrixCellValueChanging event even for emtpy cell

The original issue was created in SurveyJS Support Forum and related to select2.

survey-library Enhancement Refactor rendering survey logo&title

We have code duplication for rendering survey logo&title in different frameworks and then in Creator V2 (knockout and react). We should put this code into model and add unit tests.

survey-library Enhancement Move using settings.customIcons proxy on svg icon level

We were using Survey.settings.customIcons in actions.

  /**
   * Specifies a list of custom icons.
   * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
   * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value.
   * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon"
   */
  customIcons: {},

It means that using svg icons directly in Creator V2, for example, pass by this functionality. We need to use svg icons directly in svg icons.

survey-library Enhancement Add canRemoveRowsCallback function into matrix dynamic

We need this call back function to additionally control deleting actions in Creator V2. It can't be done by using minRowCount as it could be done normally.

survey-creator Bug Toolbox doesn't load in 1.8.57

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

Bug

What is the current behavior?

Toolbox doesn't load, get this error in the console:

Uncaught ReferenceError: Unable to process binding "if: function(){return koHasCategories }"
Message: Unable to process binding "foreach: function(){return koCategories }"
Message: Unable to process binding "foreach: function(){return actions }"
Message: actions is not defined
    at foreach (eval at createBindingsStringEvaluator (knockout-latest.debug.js?v=develop:3221), <anonymous>:3:60)
    at evaluateValueAccessor (knockout-latest.debug.js?v=develop:3494)
    at knockout-latest.debug.js?v=develop:3671
    at knockout-latest.debug.js?v=develop:4695
    at Object.init (knockout-latest.debug.js?v=develop:6062)
    at init (knockout-latest.debug.js?v=develop:4721)
    at knockout-latest.debug.js?v=develop:3730
    at Object.ignore (knockout-latest.debug.js?v=develop:1563)
    at knockout-latest.debug.js?v=develop:3729
    at Object.arrayForEach (knockout-latest.debug.js?v=develop:168)

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

Run the editor with version 1.8.57

Specify your

  • browser: chrome
  • editor version:
survey-creator Bug Fix d.ts file by removing IActionBarItem

We have to remove all using IActionBarItem in Creator V1 and replace it vs IAction

survey-creator Bug Question title start edit button is on the next line

image

survey-pdf Bug Multiple text has wrong layout in case several columns

Live sample

Survey JSON:

{
    "questions": [
        {
     "type": "multipletext",
     "name": "question1",
     "items": [
      {
       "name": "text1",
       "title": "Report Origin:"
      },
      {
       "name": "text2",
       "title": "Surgeon:"
      },
      {
       "name": "text3",
       "title": "Date of surgery:"
      }
     ],
     "colCount": 2
    }
    ]
}

How survey library looks: image

How survey pdf looks: image

survey-pdf Bug RowLine color is always blue
custom-widgets Bug Select2 "other" option with storeOthersAsComment set to false issue (React)

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

Bug

What is the current behavior?

In React version (maybe in others too but I use/noticed this in React) when the select2 widget is active, and the storeOthersAsComment is set to false and the dropdown question has the other option (hasOther: true), select the "Other" option and try to write something in the textarea. As soon as you type one key, it will add that as a new option in the dropdown (and it will be selected) and the textarea gets hidden.

What is the expected behavior?

When you select the "other" option you can type in the textarea as much as you want without hiding the field and adding it to the dropdown as a new option (so just like it behaves without storeOthersAsComment set to false).

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

Activate select2, add a dropdown question, then set the hasOther to true and also set the storeOthersAsComment to false.

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

From this page: https://surveyjs.io/Examples/Library?id=custom-widget-select2&platform=Reactjs&theme=bootstrap (Edit in...) I created a new codesandbox fork and edited to reproduce the bug. It's nothing to do with choicesByUrl since it's reproducible with normal choices too.

Tested page URL: https://codesandbox.io/s/xenodochial-fire-1lkbl

Test code

import React, { Component } from "react";
import $ from "jquery";
import select2Init from "select2";
import "select2/dist/css/select2.min.css";

import * as Survey from "survey-react";
import * as widgets from "surveyjs-widgets";

import "bootstrap/dist/css/bootstrap.css";
import "survey-react/survey.css";
import "./index.css";

Survey.StylesManager.applyTheme("bootstrap");

class SurveyComponent extends Component {
  constructor() {
    super();
    window["$"] = window["jQuery"] = $;
    select2Init();
  }
  render() {
    widgets.select2(Survey);
    widgets.select2tagbox(Survey);

    const json = {
      elements: [
        {
          type: "dropdown",
          renderAs: "select2",
          hasOther: true,
          choicesByUrl: {
            url: "https://restcountries.eu/rest/v2/all"
          },
          name: "countries",
          title: "Please select the country you have arrived from:"
        }
      ]
    };
    const survey = new Survey.Model(json);

    survey.storeOthersAsComment = false;

    return <Survey.Survey model={survey} />;
  }
}

export default SurveyComponent;

Specify your

  • browser: Chrome, Firefox
  • browser version: Chrome: 92.0.4515.107, FF: 91.0b6
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.57 (latest atm)

Version: v1.8.58, released at Thursday, July 29, 2021, Total Issue Count: 16

Product
survey-library
Type
Enhancement
Description
Add SurveyElement isQuestion property

There is no easy way to find out is a survey element (SurveyElement class) is question or not. element.isQuestion should return 'true' if an element is a question.

If there is a file question located in a dynamic panel and file downloading/uploading using survey event then on setting survey into preview mode the exception is raised. The issue was reported on SurveyJS Support Forum.

Product
survey-library
Type
Bug
Description
The first title action fired on pressing enter in a text editor

We render a title action button as default, as result any enter fires the action of this button.

Product
survey-library
Type
Bug
Description
placeHolder is not updated immediately in text and comment on chaning

The following code will not change the rendering immediately: textQuestion.placeHolder = "Please type your name...";

Product
survey-library
Type
Enhancement
Description
Improve question displayValue functionality
  1. If dropdown/radiogroup/checkboxes have choices with empty value, like new ItemValue("", "Empty") then displayValue should return "Empty" for a question with empty value.
  2. add displayValueCallback: (text: string): string callback function into question class to allow override the default behavior of displayValue property and getDisplayValue function
Product
survey-library
Type
Bug
Description
Action ResponsivityManager works incorrectly with invisible actions

ResponsivityManager calcualtes space for invisible items and as result it leads to incorrect rendering.

The original issue was created in SurveyJS Support Forum and related to select2.

Product
survey-library
Type
Enhancement
Description
Refactor rendering survey logo&title

We have code duplication for rendering survey logo&title in different frameworks and then in Creator V2 (knockout and react). We should put this code into model and add unit tests.

Product
survey-library
Type
Enhancement
Description
Move using settings.customIcons proxy on svg icon level

We were using Survey.settings.customIcons in actions.

  /**
   * Specifies a list of custom icons.
   * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
   * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value.
   * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon"
   */
  customIcons: {},

It means that using svg icons directly in Creator V2, for example, pass by this functionality. We need to use svg icons directly in svg icons.

Product
survey-library
Type
Enhancement
Description
Add canRemoveRowsCallback function into matrix dynamic

We need this call back function to additionally control deleting actions in Creator V2. It can't be done by using minRowCount as it could be done normally.

Product
survey-creator
Type
Bug
Description
Toolbox doesn't load in 1.8.57

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

Bug

What is the current behavior?

Toolbox doesn't load, get this error in the console:

Uncaught ReferenceError: Unable to process binding "if: function(){return koHasCategories }"
Message: Unable to process binding "foreach: function(){return koCategories }"
Message: Unable to process binding "foreach: function(){return actions }"
Message: actions is not defined
    at foreach (eval at createBindingsStringEvaluator (knockout-latest.debug.js?v=develop:3221), <anonymous>:3:60)
    at evaluateValueAccessor (knockout-latest.debug.js?v=develop:3494)
    at knockout-latest.debug.js?v=develop:3671
    at knockout-latest.debug.js?v=develop:4695
    at Object.init (knockout-latest.debug.js?v=develop:6062)
    at init (knockout-latest.debug.js?v=develop:4721)
    at knockout-latest.debug.js?v=develop:3730
    at Object.ignore (knockout-latest.debug.js?v=develop:1563)
    at knockout-latest.debug.js?v=develop:3729
    at Object.arrayForEach (knockout-latest.debug.js?v=develop:168)

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

Run the editor with version 1.8.57

Specify your

  • browser: chrome
  • editor version:
Product
survey-creator
Type
Bug
Description
Fix d.ts file by removing IActionBarItem

We have to remove all using IActionBarItem in Creator V1 and replace it vs IAction

Product
survey-creator
Type
Bug
Description
Question title start edit button is on the next line

image

Product
survey-pdf
Type
Bug
Description
Multiple text has wrong layout in case several columns

Live sample

Survey JSON:

{
    "questions": [
        {
     "type": "multipletext",
     "name": "question1",
     "items": [
      {
       "name": "text1",
       "title": "Report Origin:"
      },
      {
       "name": "text2",
       "title": "Surgeon:"
      },
      {
       "name": "text3",
       "title": "Date of surgery:"
      }
     ],
     "colCount": 2
    }
    ]
}

How survey library looks: image

How survey pdf looks: image

Product
survey-pdf
Type
Bug
Description
RowLine color is always blue

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

Bug

What is the current behavior?

In React version (maybe in others too but I use/noticed this in React) when the select2 widget is active, and the storeOthersAsComment is set to false and the dropdown question has the other option (hasOther: true), select the "Other" option and try to write something in the textarea. As soon as you type one key, it will add that as a new option in the dropdown (and it will be selected) and the textarea gets hidden.

What is the expected behavior?

When you select the "other" option you can type in the textarea as much as you want without hiding the field and adding it to the dropdown as a new option (so just like it behaves without storeOthersAsComment set to false).

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

Activate select2, add a dropdown question, then set the hasOther to true and also set the storeOthersAsComment to false.

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

From this page: https://surveyjs.io/Examples/Library?id=custom-widget-select2&platform=Reactjs&theme=bootstrap (Edit in...) I created a new codesandbox fork and edited to reproduce the bug. It's nothing to do with choicesByUrl since it's reproducible with normal choices too.

Tested page URL: https://codesandbox.io/s/xenodochial-fire-1lkbl

Test code

import React, { Component } from "react";
import $ from "jquery";
import select2Init from "select2";
import "select2/dist/css/select2.min.css";

import * as Survey from "survey-react";
import * as widgets from "surveyjs-widgets";

import "bootstrap/dist/css/bootstrap.css";
import "survey-react/survey.css";
import "./index.css";

Survey.StylesManager.applyTheme("bootstrap");

class SurveyComponent extends Component {
  constructor() {
    super();
    window["$"] = window["jQuery"] = $;
    select2Init();
  }
  render() {
    widgets.select2(Survey);
    widgets.select2tagbox(Survey);

    const json = {
      elements: [
        {
          type: "dropdown",
          renderAs: "select2",
          hasOther: true,
          choicesByUrl: {
            url: "https://restcountries.eu/rest/v2/all"
          },
          name: "countries",
          title: "Please select the country you have arrived from:"
        }
      ]
    };
    const survey = new Survey.Model(json);

    survey.storeOthersAsComment = false;

    return <Survey.Survey model={survey} />;
  }
}

export default SurveyComponent;

Specify your

  • browser: Chrome, Firefox
  • browser version: Chrome: 92.0.4515.107, FF: 91.0b6
  • surveyjs platform (angular or react or jquery or knockout or vue): React
  • surveyjs version: 1.8.57 (latest atm)

Version: v1.8.57, released at Tuesday, July 20, 2021, Total Issue Count: 14

Product Type Description
survey-library Enhancement Readonly Question title is not getting disabled in default theme.

Hi Team,

Readonly question title is not getting disabled. The disabled class is getting undefined in the default theme. It's working fine in the modern theme. Input is getting the disabled attribute, but the title is getting undefined class due to which we are not able to assign read-only CSS to the question.

image image

Thanks, Sachin Tiwari

survey-library Enhancement Do not apply lazy rendering for first elements in the survey/page

To avoid a delay in rendering for the first elements, we can render first elements immediately on the page. SurveyJS will use Survey.settings.lazyRowsRenderingStartRow numeric property.

survey-library Enhancement Add survey onGetExpressionDisplayValue to override expression display value

Sometimes there is no easy way to override the expression question display value by using format and other properties. This event will allow to change the display value directly in code.

  /**
   * The event is fired before expression question convert it's value into display value for rendering.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - The expression question.
   * <br/> `options.value` - The question value.
   * <br/> `options.displayValue` - the display value that you can change before rendering.
   */
  public onGetExpressionDisplayValue: EventBase<SurveyModel>;

Example of using:

survey.onGetExpressionDisplayValue.add((sender, options) => {
  const val = options.value;
  if(!val && val !== false && val !== 0) {
    options.displayValue = "Value is empty."
  }
});
survey-library Bug Exception on runTriggers() function in complex scenario

The following code produces the error:

  var survey = new Survey({
    elements: [
      {
        type: "text",
        name: "q1",
      },
      {
        type: "matrixdynamic",
        name: "matrix",
        visibleIf: "{q1} = 'yes'",
        columns: [
          {
            name: "col1",
            cellType: "text",
          },
        ],
        rowCount: 1,
      },
      {
        type: "radiogroup",
        name: "radio",
        choices: [
          {
            value: "yes",
            text: "Yes",
          },
          {
            value: "no",
            text: "No",
          },
        ],
      },
    ],
    triggers: [
      {
        type: "setvalue",
        expression: "{matrix[0].col1} notcontains 'x'",
        setToName: "radio",
        setValue: "no",
      },
    ],
  });
  survey.runTriggers();

survey-library Bug getPlainData() function doesn't work correctly for matrix dropdown

matrix dropdown getPlainData() returns rows value for the title, instead of rows text.

survey-library Bug Do not show in creator V2 selectAll, none and hasOther if these properties are invisible

Do not render in design options in radiogroup/dropdown/checkbox if their related properties are hidden.

survey-library Enhancement Add disableTabStop property into IAction/Action

We need to disable tabstop for some buttons in actions. A new disableTabStop property (default is false) is added for this purpose.

survey-library Bug Questions are not rendering in lazyRendering mode on deleting elements on the top

On deleting elements on the top, scroll events is not fired and as result elements in invisible area are not rendered. We have to fire "scroll" event manually.

survey-library Enhancement Change onApply function callback property for popup

Add ability to cancel closing popup window on apply by returning false onApply callback

survey-library Bug Could not override defaultValue for question hideNumber property

The following code doesn't work: Survey.Serializer.findProperty("question", "hideNumber").defaultValue = true;, question.hideNumber returns 'false' by default.

survey-pdf Bug Dropdown display issue
  • long dropdown value does not brake line when rendering
  • dropdown with other comment value that contains tab characters is not rendered well

https://plnkr.co/edit/z8P7f2T1xOW5buFw

thank you for considering this

survey-pdf Enhancement HtmlToImage method does not respect custom fonts

See the thread in support center.

survey-pdf Bug Standard html rendering may cause errors in adobe acrobat

See the support center for more details

survey-pdf Bug Table in description throws an error when trying to export PDF

See the ticket in support center

Version: v1.8.57, released at Tuesday, July 20, 2021, Total Issue Count: 14

Product
survey-library
Type
Enhancement
Description
Readonly Question title is not getting disabled in default theme.

Hi Team,

Readonly question title is not getting disabled. The disabled class is getting undefined in the default theme. It's working fine in the modern theme. Input is getting the disabled attribute, but the title is getting undefined class due to which we are not able to assign read-only CSS to the question.

image image

Thanks, Sachin Tiwari

Product
survey-library
Type
Enhancement
Description
Do not apply lazy rendering for first elements in the survey/page

To avoid a delay in rendering for the first elements, we can render first elements immediately on the page. SurveyJS will use Survey.settings.lazyRowsRenderingStartRow numeric property.

Product
survey-library
Type
Enhancement
Description
Add survey onGetExpressionDisplayValue to override expression display value

Sometimes there is no easy way to override the expression question display value by using format and other properties. This event will allow to change the display value directly in code.

  /**
   * The event is fired before expression question convert it's value into display value for rendering.
   * <br/> `sender` - the survey object that fires the event.
   * <br/> `options.question` - The expression question.
   * <br/> `options.value` - The question value.
   * <br/> `options.displayValue` - the display value that you can change before rendering.
   */
  public onGetExpressionDisplayValue: EventBase<SurveyModel>;

Example of using:

survey.onGetExpressionDisplayValue.add((sender, options) => {
  const val = options.value;
  if(!val && val !== false && val !== 0) {
    options.displayValue = "Value is empty."
  }
});
Product
survey-library
Type
Bug
Description
Exception on runTriggers() function in complex scenario

The following code produces the error:

  var survey = new Survey({
    elements: [
      {
        type: "text",
        name: "q1",
      },
      {
        type: "matrixdynamic",
        name: "matrix",
        visibleIf: "{q1} = 'yes'",
        columns: [
          {
            name: "col1",
            cellType: "text",
          },
        ],
        rowCount: 1,
      },
      {
        type: "radiogroup",
        name: "radio",
        choices: [
          {
            value: "yes",
            text: "Yes",
          },
          {
            value: "no",
            text: "No",
          },
        ],
      },
    ],
    triggers: [
      {
        type: "setvalue",
        expression: "{matrix[0].col1} notcontains 'x'",
        setToName: "radio",
        setValue: "no",
      },
    ],
  });
  survey.runTriggers();

Product
survey-library
Type
Bug
Description
getPlainData() function doesn't work correctly for matrix dropdown

matrix dropdown getPlainData() returns rows value for the title, instead of rows text.

Do not render in design options in radiogroup/dropdown/checkbox if their related properties are hidden.

Product
survey-library
Type
Enhancement
Description
Add disableTabStop property into IAction/Action

We need to disable tabstop for some buttons in actions. A new disableTabStop property (default is false) is added for this purpose.

On deleting elements on the top, scroll events is not fired and as result elements in invisible area are not rendered. We have to fire "scroll" event manually.

Product
survey-library
Type
Enhancement
Description
Change onApply function callback property for popup

Add ability to cancel closing popup window on apply by returning false onApply callback

Product
survey-library
Type
Bug
Description
Could not override defaultValue for question hideNumber property

The following code doesn't work: Survey.Serializer.findProperty("question", "hideNumber").defaultValue = true;, question.hideNumber returns 'false' by default.

Product
survey-pdf
Type
Bug
Description
Dropdown display issue
  • long dropdown value does not brake line when rendering
  • dropdown with other comment value that contains tab characters is not rendered well

https://plnkr.co/edit/z8P7f2T1xOW5buFw

thank you for considering this

Product
survey-pdf
Type
Enhancement
Description
HtmlToImage method does not respect custom fonts

See the thread in support center.

Product
survey-pdf
Type
Bug
Description
Standard html rendering may cause errors in adobe acrobat

See the support center for more details

Product
survey-pdf
Type
Bug
Description
Table in description throws an error when trying to export PDF

See the ticket in support center

Version: v1.8.56, released at Tuesday, July 13, 2021, Total Issue Count: 8

Product Type Description
survey-library Enhancement Render question/panel collapse/expand button by using action bar

We have a custom rendering for title collapse/expand action. It is time to replace it with our action bar. Additionally, we should add tabindex and aria* attributes for header when there is collapse/expand button to allow expand/collapse panel and question content by keyboard

survey-library Bug Elements Can Bypass Required or Other Validation

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

Reporting a Bug which also maybe a feature.

What is the current behavior?

Given you have a checkbox group, radio select, or drop down field you can set a value such that it will pass validation. This validation can be a minimum count (for checkbox), or just marking it as required.

If you have a checkbox group that has a minimum count of 2, you can pass that validation by setting the value of 2 empty strings: ["", ""]

If you have a radio button group or a dropdown marked as required you can pass validation by setting [''].

If you have a textfield it can get fooled into passing required validation by also setting it's value to an array ['']

What is the expected behavior?

I expect the validation of a checkbox, radio group, or dropdown to verify that the values given as input are valid values since the choices are specified.

If the values are not valid then they should be ignored.

I would also expect all fields to do some kind of input checking (i.e., text field is smart enough to not be fooled by an empty string, but is fooled by an array)

The textbox seems less important to me than the checkbox because the output type of a checkbox element is an array, so an array input for a textbox shouldn't normally be expected.

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

By setting the values specified above on a survey.

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

Tested page URL: https://jsfiddle.net/mwrouse/xhk4now2/20/

That page has 2 surveys on the same page, the first one is without setting any values, so it will work as expected. The second is setting the values that can trick the validation.

Test code

var json = {
 "completedHtml": "<p><h4>Thank you for sharing this information with us.</h4></p><p>Your name is: <b>{name}</b></p><p>Your email is: <b>{email}</b></p><p>This information is not in the survey data result:<b> {tempvar}</b></p>",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "checkbox",
     "name": "question1",
     "validators": [
      {
       "type": "answercount",
       "minCount": 2
      }
     ],
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "radiogroup",
     "name": "question2",
     "isRequired": true,
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "dropdown",
     "name": "question3",
     "isRequired": true,
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
     {
     "type": "text",
     "name": "question4",
     "isRequired": true
    }
   ],
   "title": "Survey Example"
  }
 ],
};

var survey = new Survey.Model(json);
survey.setValue('question1', ["", ""]);
survey.setValue('question2', ['']);
survey.setValue('question3', ['']);
survey.setValue('question4', ['']);

Specify Your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.55
survey-library Bug Column title renders as empty string on changing matrix cellType in knockout

Let's say you have the following matrix:

    var survey = new Survey({
      elements: [
        {
          type: "matrixdynamic",
          name: "matrix",
          columns: [{ name: "col1" }],
        },
      ],
    });

After the matrix was rendered, the following code will change the column cell type from "dropdown" to "checkbox", but column title will be rendered as empty instead of "col1".

var matrix = survey.getQuestionByName("matrix");
matrix.cellType = "checkbox";

survey-library Bug Text validator validates empty string

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

Question? Bug?

What is the current behavior?

If you have a texfield with validation (minimum length) then when you start the survey, you are able to complete the survey since these values are empty.

However, if you type in the textfield, you can't undo that action after the value has been set. Erasing the contents of the textfield won't allow it to pass validation anymore.

What is the expected behavior?

I would expect that if a question is not marked as required, that it should be able to pass validation without having a value set.

Even if you set the value, but then later change the value (e.g. a textfield with minimum length validation), it should not hold up the survey unless marked as required.

It appears that if you have a minimum count on a checkbox then it essentially makes it required. You can't complete the survey until that minimum requirement is met. Even though the question is not marked as required https://jsfiddle.net/mwrouse/qzfw87hL/4/

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

Make a survey with a textfield that has a minimum length > 0

Run the survey, don't set any values and you will be able to complete the survey.

Run the survey again, type in the textbox field, and click out of the field. Then if you erase the contents you will fail the minimum length validation.

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

Tested page URL: https://jsfiddle.net/mwrouse/abo3eLdk/5/

Test code


var json = {
 "completedHtml": "<p><h4>Thank you for sharing this information with us.</h4></p><p>Your name is: <b>{name}</b></p><p>Your email is: <b>{email}</b></p><p>This information is not in the survey data result:<b> {tempvar}</b></p>",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "text",
     "name": "question1",
     "validators": [
      {
       "type": "text",
       "minLength": 500000,
       "maxLength": 0,
       "allowDigits": true
      }
     ]
    }
   ],
   "title": "Type, Click Out, and Erase = Failed Validation"
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "setToName": "name",
   "setValue": "Jon Snow"
  },
  {
   "type": "setvalue",
   "setToName": "email",
   "setValue": "jon.snow@nightwatch.com"
  },
  {
   "type": "setvalue",
   "setToName": "tempvar",
   "setValue": "You have decided to use your current information.",
   "isVariable": true
  },
  {
   "type": "setvalue",
   "setToName": "name"
  },
  {
   "type": "setvalue",
   "setToName": "email"
  },
  {
   "type": "setvalue",
   "setToName": "tempvar",
   "setValue": "You have decided not to use your current information.",
   "isVariable": true
  }
 ]
};

window.survey = new Survey.Model(json);
survey.checkErrorsMode = 'onValueChanged';
survey.render("surveyElement");

Specify your

  • browser: Chrome
  • browser version: latest
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.55
survey-library Bug Do not run answer count validator on empty array

We should not check min/max answers on checkbox question if an user doesn't check anything. If the question is not required then we should acceopt an empty value regardless of this validator. Answer count validator should work for non-empty array only.

survey-library Bug survey.onGetQuestionTitle event doesn't work in knockout

We have to update localziation strings on adding/removing function handlers in onGetQuestionTitle event.

survey-creator Bug Do not clear creator JSON on calling render function

On calling creator.render() function we simply clears the survey JSON. We have to check if there is already JSON in creator then do not override it with the default one page without questions JSON.

survey-pdf Enhancement Add option to render all text questions as multiline

Version: v1.8.56, released at Tuesday, July 13, 2021, Total Issue Count: 8

Product
survey-library
Type
Enhancement
Description
Render question/panel collapse/expand button by using action bar

We have a custom rendering for title collapse/expand action. It is time to replace it with our action bar. Additionally, we should add tabindex and aria* attributes for header when there is collapse/expand button to allow expand/collapse panel and question content by keyboard

Product
survey-library
Type
Bug
Description
Elements Can Bypass Required or Other Validation

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

Reporting a Bug which also maybe a feature.

What is the current behavior?

Given you have a checkbox group, radio select, or drop down field you can set a value such that it will pass validation. This validation can be a minimum count (for checkbox), or just marking it as required.

If you have a checkbox group that has a minimum count of 2, you can pass that validation by setting the value of 2 empty strings: ["", ""]

If you have a radio button group or a dropdown marked as required you can pass validation by setting [''].

If you have a textfield it can get fooled into passing required validation by also setting it's value to an array ['']

What is the expected behavior?

I expect the validation of a checkbox, radio group, or dropdown to verify that the values given as input are valid values since the choices are specified.

If the values are not valid then they should be ignored.

I would also expect all fields to do some kind of input checking (i.e., text field is smart enough to not be fooled by an empty string, but is fooled by an array)

The textbox seems less important to me than the checkbox because the output type of a checkbox element is an array, so an array input for a textbox shouldn't normally be expected.

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

By setting the values specified above on a survey.

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

Tested page URL: https://jsfiddle.net/mwrouse/xhk4now2/20/

That page has 2 surveys on the same page, the first one is without setting any values, so it will work as expected. The second is setting the values that can trick the validation.

Test code

var json = {
 "completedHtml": "<p><h4>Thank you for sharing this information with us.</h4></p><p>Your name is: <b>{name}</b></p><p>Your email is: <b>{email}</b></p><p>This information is not in the survey data result:<b> {tempvar}</b></p>",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "checkbox",
     "name": "question1",
     "validators": [
      {
       "type": "answercount",
       "minCount": 2
      }
     ],
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "radiogroup",
     "name": "question2",
     "isRequired": true,
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
    {
     "type": "dropdown",
     "name": "question3",
     "isRequired": true,
     "choices": [
      "item1",
      "item2",
      "item3"
     ]
    },
     {
     "type": "text",
     "name": "question4",
     "isRequired": true
    }
   ],
   "title": "Survey Example"
  }
 ],
};

var survey = new Survey.Model(json);
survey.setValue('question1', ["", ""]);
survey.setValue('question2', ['']);
survey.setValue('question3', ['']);
survey.setValue('question4', ['']);

Specify Your

  • browser: Chrome
  • browser version: Latest
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.55

Let's say you have the following matrix:

    var survey = new Survey({
      elements: [
        {
          type: "matrixdynamic",
          name: "matrix",
          columns: [{ name: "col1" }],
        },
      ],
    });

After the matrix was rendered, the following code will change the column cell type from "dropdown" to "checkbox", but column title will be rendered as empty instead of "col1".

var matrix = survey.getQuestionByName("matrix");
matrix.cellType = "checkbox";

Product
survey-library
Type
Bug
Description
Text validator validates empty string

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

Question? Bug?

What is the current behavior?

If you have a texfield with validation (minimum length) then when you start the survey, you are able to complete the survey since these values are empty.

However, if you type in the textfield, you can't undo that action after the value has been set. Erasing the contents of the textfield won't allow it to pass validation anymore.

What is the expected behavior?

I would expect that if a question is not marked as required, that it should be able to pass validation without having a value set.

Even if you set the value, but then later change the value (e.g. a textfield with minimum length validation), it should not hold up the survey unless marked as required.

It appears that if you have a minimum count on a checkbox then it essentially makes it required. You can't complete the survey until that minimum requirement is met. Even though the question is not marked as required https://jsfiddle.net/mwrouse/qzfw87hL/4/

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

Make a survey with a textfield that has a minimum length > 0

Run the survey, don't set any values and you will be able to complete the survey.

Run the survey again, type in the textbox field, and click out of the field. Then if you erase the contents you will fail the minimum length validation.

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

Tested page URL: https://jsfiddle.net/mwrouse/abo3eLdk/5/

Test code


var json = {
 "completedHtml": "<p><h4>Thank you for sharing this information with us.</h4></p><p>Your name is: <b>{name}</b></p><p>Your email is: <b>{email}</b></p><p>This information is not in the survey data result:<b> {tempvar}</b></p>",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "text",
     "name": "question1",
     "validators": [
      {
       "type": "text",
       "minLength": 500000,
       "maxLength": 0,
       "allowDigits": true
      }
     ]
    }
   ],
   "title": "Type, Click Out, and Erase = Failed Validation"
  }
 ],
 "triggers": [
  {
   "type": "setvalue",
   "setToName": "name",
   "setValue": "Jon Snow"
  },
  {
   "type": "setvalue",
   "setToName": "email",
   "setValue": "jon.snow@nightwatch.com"
  },
  {
   "type": "setvalue",
   "setToName": "tempvar",
   "setValue": "You have decided to use your current information.",
   "isVariable": true
  },
  {
   "type": "setvalue",
   "setToName": "name"
  },
  {
   "type": "setvalue",
   "setToName": "email"
  },
  {
   "type": "setvalue",
   "setToName": "tempvar",
   "setValue": "You have decided not to use your current information.",
   "isVariable": true
  }
 ]
};

window.survey = new Survey.Model(json);
survey.checkErrorsMode = 'onValueChanged';
survey.render("surveyElement");

Specify your

  • browser: Chrome
  • browser version: latest
  • surveyjs platform (angular or react or jquery or knockout or vue): knockout
  • surveyjs version: 1.8.55
Product
survey-library
Type
Bug
Description
Do not run answer count validator on empty array

We should not check min/max answers on checkbox question if an user doesn't check anything. If the question is not required then we should acceopt an empty value regardless of this validator. Answer count validator should work for non-empty array only.

Product
survey-library
Type
Bug
Description
survey.onGetQuestionTitle event doesn't work in knockout

We have to update localziation strings on adding/removing function handlers in onGetQuestionTitle event.

Product
survey-creator
Type
Bug
Description
Do not clear creator JSON on calling render function

On calling creator.render() function we simply clears the survey JSON. We have to check if there is already JSON in creator then do not override it with the default one page without questions JSON.

Product
survey-pdf
Type
Enhancement
Description
Add option to render all text questions as multiline

Version: v1.8.55, released at Wednesday, July 7, 2021, Total Issue Count: 10

Product Type Description
survey-library Enhancement Do not show enableIf property for rateValues items in rating question

We do not enable/disable items in rating question since it doens't make sence. It means that we need to hide enableIf property.

survey-library Bug Dynamic dropdown with enableIf not displayed correctly

This is a complex case in our application, that we solved only by removing the enableIf from matrixdynamic field.

We need to make this matrix add/remove rows open for specific users and also the columns.

For user: "1" displays correctly, for user: "2" does not.

https://plnkr.co/edit/nq4dNpRFoDwhEG13?preview

survey-library Enhancement Add ability to override the default icons in SurveyJS Library/Creator

Add new options into survey settings:

  /**
   * Specifies a list of custom icons.
   * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
   * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value.
   * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon"
   */
  customIcons: {},
survey-library Bug Boolean question that renders as switch should support goNextPageAutomatic

The old render, checkbox style, boolean question should not support goNextPageAutomatic, since it requres two clicks to set false from unknow/indeterminate state: check and then un-check. Switch, the default current render, allows to set true/false by one click. It means that for "switch" (default) render style we can support goNextPageAutomatic.

survey-library Bug Adding/Removing/Changing choices in column for matrices dynamic/dropdown doesn't work correctly

We do not modify on fly changing choices in matrices columns if a column is not default. The original issue was reported in SurveyJS support forum.

survey-library Bug Expression with "anyof" with 0 can executed incorrectly

The following code will return incorrect value:

  const runner = new Survey.ConditionRunner("{value} anyof [7, 3, 0]");
  values.value = 0;
  const res = runner.run(values);

The result will be false instead of true. We treat values.value as undefined, instead of 0. It is incorrect.

survey-library Bug React: Do not change state on properties change on rendering wrapper components

We do not change state on rendering a root component, however, we should check wrapper components as well.

survey-creator Bug When custom saveSurveyFunc fails to save an exception occurs

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

I am reporting a bug.

What is the current behavior?

When a custom method is used to save a survey, and that method reports to the callback the save has failed, an error is shown in console and the saving loader persists.

What is the expected behavior?

A notification is shown and loader doesn't persist

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

https://plnkr.co/edit/UaU5wJydANLp2KIu Click save in above example

Workaround

Disabling the error when save fails.

            var options = {
                showErrorOnFailedSave: false
            };

            var creator = new SurveyCreator.SurveyCreator("creatorElement", options);
survey-creator Enhancement Image picker choose image adorner - allow choose images if contentMode === "video"

If contentMode === "video" for an image picker question, choose image adorner should allow to choose videos by default

custom-widgets Bug Select2 doesn't set question value on form auto fill

Version: v1.8.55, released at Wednesday, July 7, 2021, Total Issue Count: 10

Product
survey-library
Type
Enhancement
Description
Do not show enableIf property for rateValues items in rating question

We do not enable/disable items in rating question since it doens't make sence. It means that we need to hide enableIf property.

Product
survey-library
Type
Bug
Description
Dynamic dropdown with enableIf not displayed correctly

This is a complex case in our application, that we solved only by removing the enableIf from matrixdynamic field.

We need to make this matrix add/remove rows open for specific users and also the columns.

For user: "1" displays correctly, for user: "2" does not.

https://plnkr.co/edit/nq4dNpRFoDwhEG13?preview

Product
survey-library
Type
Enhancement
Description
Add ability to override the default icons in SurveyJS Library/Creator

Add new options into survey settings:

  /**
   * Specifies a list of custom icons.
   * Use this property to replace SurveyJS default icons (displayed in UI elements of SurveyJS Library or Creator) with your custom icons.
   * For every default icon to replace, add a key/value object with the default icon's name as a key and the name of your custom icon as a value.
   * For example: Survey.settings.customIcons["icon-redo"] = "my-own-redo-icon"
   */
  customIcons: {},

The old render, checkbox style, boolean question should not support goNextPageAutomatic, since it requres two clicks to set false from unknow/indeterminate state: check and then un-check. Switch, the default current render, allows to set true/false by one click. It means that for "switch" (default) render style we can support goNextPageAutomatic.

We do not modify on fly changing choices in matrices columns if a column is not default. The original issue was reported in SurveyJS support forum.

Product
survey-library
Type
Bug
Description
Expression with "anyof" with 0 can executed incorrectly

The following code will return incorrect value:

  const runner = new Survey.ConditionRunner("{value} anyof [7, 3, 0]");
  values.value = 0;
  const res = runner.run(values);

The result will be false instead of true. We treat values.value as undefined, instead of 0. It is incorrect.

We do not change state on rendering a root component, however, we should check wrapper components as well.

Product
survey-creator
Type
Bug
Description
When custom saveSurveyFunc fails to save an exception occurs

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

I am reporting a bug.

What is the current behavior?

When a custom method is used to save a survey, and that method reports to the callback the save has failed, an error is shown in console and the saving loader persists.

What is the expected behavior?

A notification is shown and loader doesn't persist

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

https://plnkr.co/edit/UaU5wJydANLp2KIu Click save in above example

Workaround

Disabling the error when save fails.

            var options = {
                showErrorOnFailedSave: false
            };

            var creator = new SurveyCreator.SurveyCreator("creatorElement", options);

If contentMode === "video" for an image picker question, choose image adorner should allow to choose videos by default

Product
custom-widgets
Type
Bug
Description
Select2 doesn't set question value on form auto fill

Version: v1.8.54, released at Wednesday, June 30, 2021, Total Issue Count: 5

Product Type Description
survey-library Enhancement Focus first editable cell in the new row on adding a new row via UI

SurveyJS should focus the first editable cell in a new added row, if a user adds row by clicking "New Row" button.

survey-library Bug React: Single matrix columns are not updated on changing if matrix is editing in property grid

The bug was found on testing SurveyJS Creator V2, react version, React: Matrix (single choice) doesn't update after add/remove columns. Property grid overrides columns onArrayChanged callback, however it doesn't need this callback.

survey-creator Bug The direction of splitter is not working properly in right to left forms

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

What is the current behavior?

What is the expected behavior?

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

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

Tested page URL:

Test code

your_code_here

Specify your

  • browser:
  • editor version:
survey-creator Bug Not able to move question from one page to another on editing question in Modal Window

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

Bug

What is the current behavior?

No able to move questions from one page to another. In the console i receive this error

base.ts:1543 Uncaught TypeError: t.addElement is not a function at t.setPage (base.ts:1543) at t.set (question.ts:198) at t.e.updatePropertyValue (propertyEditorBase.ts:435) at e.onEditorValueChanged (objectProperty.ts:137) at t.editor.onChanged (objectProperty.ts:37) at t.e.onkoValueChanged (propertyEditorBase.ts:473) at f.ic.lc (propertyEditorBase.ts:83) at Function.notifySubscribers (knockout-latest.js:38) at Function.xa (knockout-latest.js:43) at t (knockout-latest.js:42)

What is the expected behavior?

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

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

Tested page URL:

Test code

your_code_here

Specify your

  • browser:
  • editor version:
custom-widgets Enhancement Tagbox component doesn't support other placeholder text

Tagbox component is supporting hasOther option. So, that I am able to add new values. But, I want to have placeholder value for text area. Please provide the otherPlaceHolder option. This option is available in most of the surveyjs components.

Version: v1.8.54, released at Wednesday, June 30, 2021, Total Issue Count: 5

Product
survey-library
Type
Enhancement
Description
Focus first editable cell in the new row on adding a new row via UI

SurveyJS should focus the first editable cell in a new added row, if a user adds row by clicking "New Row" button.

The bug was found on testing SurveyJS Creator V2, react version, React: Matrix (single choice) doesn't update after add/remove columns. Property grid overrides columns onArrayChanged callback, however it doesn't need this callback.

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

What is the current behavior?

What is the expected behavior?

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

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

Tested page URL:

Test code

your_code_here

Specify your

  • browser:
  • editor version:

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

Bug

What is the current behavior?

No able to move questions from one page to another. In the console i receive this error

base.ts:1543 Uncaught TypeError: t.addElement is not a function at t.setPage (base.ts:1543) at t.set (question.ts:198) at t.e.updatePropertyValue (propertyEditorBase.ts:435) at e.onEditorValueChanged (objectProperty.ts:137) at t.editor.onChanged (objectProperty.ts:37) at t.e.onkoValueChanged (propertyEditorBase.ts:473) at f.ic.lc (propertyEditorBase.ts:83) at Function.notifySubscribers (knockout-latest.js:38) at Function.xa (knockout-latest.js:43) at t (knockout-latest.js:42)

What is the expected behavior?

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

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

Tested page URL:

Test code

your_code_here

Specify your

  • browser:
  • editor version:
Product
custom-widgets
Type
Enhancement
Description
Tagbox component doesn't support other placeholder text

Tagbox component is supporting hasOther option. So, that I am able to add new values. But, I want to have placeholder value for text area. Please provide the otherPlaceHolder option. This option is available in most of the surveyjs components.

Version: v1.8.53, released at Thursday, June 24, 2021, Total Issue Count: 9

Product Type Description
survey-library Bug onValueChanged doesn't called on changing array value in custom question

The bug was find on testing SurveyJS Creator V2

survey-library Bug Setting data to matrices dynamic/dropdown in display mode doesn't set total rows values

SurveyJS doesn't set into matrices the totals value on setting it directly and doesn't recalculate them if the matrix/page/survey in readonly mode. As result on setting read-only matrix data totals are empty.

survey-library Enhancement Add detailPanelShowOnAdding boolean property into matrix dynamic

Optionally show detail panel on adding a new row in matrix dynamic.

survey-library Bug survey editingObj: Do not assign read-only array property value

The bug was found on testing SurveyJS Creator V2. Exception is raised on setting read-only survey.pages property on add/removing page in the "pages" property editor.

survey-library Bug Editing doesn't work in matrices if there is a question with the same name in detail panel

The following question JSON will not work correctly.

        {
          type: "matrixdropdown",
          name: "matrix",
          detailPanelMode: "underRow",
          detailElements: [{ type: "text", name: "q1" }],
          rows: ["row1", "row2"],
          columns: [{ cellType: "text", name: "q1" }],
        }

On changing a cell with opened detail panel, the value will be reset to the previous one.

PS: The bug is found during testing SurveyJS Creator V2.

survey-library Bug Column header title doesn't render correctly on adding column without title in code

For matrices dropdown and dynamic the following code will show a new column without a title:

matrix.addColumn("New Column") 

However, by default the title name should be taken from column name if the title is empty.

survey-library Bug Do not render empty strings in matrices headers

The bug was found during testing SurveyJS Creator V2. We are rendering empty localization strings in headers. SurveyJS Creator V2 allows to edit them. However, empty headers for actions/rows should not be edited. It is better to render empty "th" tag, without any content.

survey-library Bug If choicesByUrl.allowEmptyResponse is true and we have other value on loading in question, it doesn't set

Here is the example that reproduce the issue. We have choicesByUrl set up with allowEmptyResponse equals to true, survey "storeOthersAsComment" property is 'false', we store the "other"/comment value directly into question value. In this case, if the response returns the empty array, then we do not treat the question value as other with comment and simply ignores it.

survey-creator Bug Toolbox area is not scrollable

Version: v1.8.53, released at Thursday, June 24, 2021, Total Issue Count: 9

The bug was find on testing SurveyJS Creator V2

SurveyJS doesn't set into matrices the totals value on setting it directly and doesn't recalculate them if the matrix/page/survey in readonly mode. As result on setting read-only matrix data totals are empty.

Product
survey-library
Type
Enhancement
Description
Add detailPanelShowOnAdding boolean property into matrix dynamic

Optionally show detail panel on adding a new row in matrix dynamic.

Product
survey-library
Type
Bug
Description
survey editingObj: Do not assign read-only array property value

The bug was found on testing SurveyJS Creator V2. Exception is raised on setting read-only survey.pages property on add/removing page in the "pages" property editor.

The following question JSON will not work correctly.

        {
          type: "matrixdropdown",
          name: "matrix",
          detailPanelMode: "underRow",
          detailElements: [{ type: "text", name: "q1" }],
          rows: ["row1", "row2"],
          columns: [{ cellType: "text", name: "q1" }],
        }

On changing a cell with opened detail panel, the value will be reset to the previous one.

PS: The bug is found during testing SurveyJS Creator V2.

For matrices dropdown and dynamic the following code will show a new column without a title:

matrix.addColumn("New Column") 

However, by default the title name should be taken from column name if the title is empty.

Product
survey-library
Type
Bug
Description
Do not render empty strings in matrices headers

The bug was found during testing SurveyJS Creator V2. We are rendering empty localization strings in headers. SurveyJS Creator V2 allows to edit them. However, empty headers for actions/rows should not be edited. It is better to render empty "th" tag, without any content.

Product