SurveyJS v1.9.106
Released: September 6, 2023
SurveyJS v1.9.106 adds an ability to empty text properties, position error messages in Multiple Textboxes questions, and specify tab titles in Dynamic Panel based on a condition. Survey Creator introduces a UI that enables users to reset text property values to default and delete translation strings from a survey JSON schema in one click.
Ability to empty text properties
Previously, when you assigned an empty string to a text property, the property value was reset to default. Since SurveyJS v1.9.106, an empty string erases a text property value. For example, the following code hides a placeholder for a Dropdown question:
// In survey JSON schema:
const json = {
"elements": [{
"name": "my-dropdown",
"type": "dropdown",
// ...
"placeholder": ""
}]
}
// In JavaScript:
const dropdown = survey.getQuestionByName("my-dropdown");
dropdown.placeholder = "";
If you want to reset a property value to default, set it to undefined
or call a survey element's resetPropertyValue(propName)
method. The following code shows how to reset the placeholder
property value of a Dropdown question:
dropdown.placeholder = undefined;
// ---- or -----
dropdown.resetPropertyValue("placeholder");
Multiple Textboxes: Error messages above or below text boxes
The new release changes the position of error messages in Multiple Textboxes questions. Previously, error messages were displayed in a tooltip that appeared when users hover the mouse pointer over a text box or press and hold it. Since SurveyJS v1.9.106, error messages are displayed above or below a text box, depending on the errorLocation
property value.
Previous UI
Current UI
errorLocation: "top"
errorLocation: "bottom"
Dynamic Panel: Set panel tab titles dynamically
SurveyJS recently implemented a tab view for Dynamic Panel. The new release enhances this feature by introducing an onGetDynamicPanelTabTitle
event. Handle this event if you want to set tab titles dynamically. For example, the following code shows how to populate a tab title with a selected value from a "country"
question. Until a country is selected, the tab title displays "New country".
survey.onGetDynamicPanelTabTitle.add((_, options) => {
const value = options.panel.getQuestionByName("country").value;
options.title = value || "New country";
});
Survey Creator: Reset text property values to default in Property Grid
This release adds Reset buttons to text property editors with default values. When users click a Reset button, its property editor restores the default property value.
Survey Creator: Delete translation strings from the JSON schema
Survey Creator users can define translations for survey texts in the Translation tab. Previously, if you added custom translations within this tab, they were also added to the survey JSON schema and were never deleted from it. In the new release, Survey Creator adds Remove buttons to the language list. These buttons enable you to delete all translations to a selected language from the survey JSON schema.
New and Updated Demos
Load a Survey from SurveyJS Service
Bug Fixes
Form Library
- [React] Ranking on mobile screens: The drag icon is lost if you drag an item by it (#6837)
- Ranking: Drag & Drop works for disabled choices (#6834)
- In-place editing: Question actions appear incorrectly on the design surface (#4354)
- When using
valuePropertyName
for a Checkbox question, it is impossible to use this question in another question'svisibleIf
expression (#6852) - Tag Box: The placeholder is not updated when changing a survey locale (#6830)
- Dynamic Panel within Dynamic Panel: The inner Dynamic Panel doesn't display the specified initial number of panels (#6646)
- Dropdown with Lazy Loading occasionally returns
undefined
as a customitemvalue
property value (#6761) - A question with
visible
set tofalse
is lost on the design surface after duplicating a panel #6881
Survey Creator