SurveyJS v1.12.8
Released: October 31, 2024
SurveyJS v1.12.8 adds an event for modifying page numbers dynamically and includes bug fixes and minor enhancements.
Modify Page Numbers Dynamically
This release adds a new event to the SurveyModel
API—onGetPageNumber
. Using this event, you can dynamically modify and format survey page numbers. Assign the required page number to the options.number
parameter within the event handler. For example, the following code adds zeroes to page numbers less than 10:
import { Model } from "survey-core";
const surveyJson = { ... }
const survey = new Model(surveyJson);
survey.onGetPageNumber.add((_, options) => {
const n = Number(options.number.substring(0, options.number.indexOf(".")));
if (n && n < 10) {
options.number = "0" + options.number;
}
});
Note that this event is raised only for surveys that set the showPageNumbers
property to true
.
New Help Topics
Survey Creator: Survey Layout Guide
Survey Creator: Numbering within a Form
New and Updated Demos
Integration with Salesforce: Create Web-to-Lead Forms
Bug Fixes and Minor Enhancements
Form Library
- Dynamic Matrix: Focus the next Remove button after removing a row (#8949)
- Rating Scale displayed as a dropdown uses item values rather than labels (#8953)
- A character limit indicator appears in all text fields within a Dynamic Panel (#8958)
- Checkboxes: The
defaultValue
andsetValueExpression
properties do not work as expected whenvaluePropertyName
is set (#8973) - Signature Pad downloads an image twice when an
onDownloadFile
event handler is specified (#8966) - Dynamic Matrix applies column width settings to the first row only (#8954)
- Quiz: Start Page is numbered with -1 when
showPageNumbers
istrue
(#8983) - A bottom progress bar is not displayed when
questionsOnPageMode
issinglePage
(#8982) minLength
validation raises an error regardless of the number of entered characters when theallowDigits
property is disabled (#8988)
Survey Creator
- [React] CodeSandbox raises a warning about importing
createRoot
from"react-dom"
(#5970) - Multi-Select Matrix: The "Edit Choices" dialog doesn't update the array of column choices (#5976)
- Image question doesn't display a validation error if image upload fails when trying to replace an existing image (#5982)
- Property Grid: Unwanted labels appear in the Choices table when it contains a custom Boolean column (#6004)
- A custom adorner button does not preserve the pressed state when the question loses focus (#6005)
- [Performance] Do not create adorners for panels outside the current viewport (#5998)
Dashboard
- Table View: The
setColumnWidth()
method doesn't decrease a column width beyond a certain value (#486)
PDF Generator
- Signature Pad doesn't display a signature preview (#342)
- Radio Button Group: A circle mark is misaligned in read-only mode when a custom font is used (#340)
How to Update SurveyJS Libraries in Your Application
Angular
npm i survey-core@1.12.8 survey-angular-ui@1.12.8 --save
npm i survey-creator-core@1.12.8 survey-creator-angular@1.12.8 --save
npm i survey-analytics@1.12.8 --save
npm i survey-pdf@1.12.8 --save
React
npm i survey-core@1.12.8 survey-react-ui@1.12.8 --save
npm i survey-creator-core@1.12.8 survey-creator-react@1.12.8 --save
npm i survey-analytics@1.12.8 --save
npm i survey-pdf@1.12.8 --save
Vue 3
npm i survey-core@1.12.8 survey-vue3-ui@1.12.8 --save
npm i survey-creator-core@1.12.8 survey-creator-vue@1.12.8 --save
npm i survey-analytics@1.12.8 --save
npm i survey-pdf@1.12.8 --save
Vue 2
npm i survey-core@1.12.8 survey-vue-ui@1.12.8 --save
npm i survey-creator-core@1.12.8 survey-creator-knockout@1.12.8 --save
npm i survey-analytics@1.12.8 --save
npm i survey-pdf@1.12.8 --save
HTML/CSS/JavaScript
<link href="https://unpkg.com/survey-core@1.12.8/defaultV2.min.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="https://unpkg.com/survey-core@1.12.8/survey.core.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/survey-js-ui@1.12.8/survey-js-ui.min.js"></script>
<script src="https://unpkg.com/survey-core@1.12.8/themes/index.min.js"></script>
<link href="https://unpkg.com/survey-creator-core@1.12.8/survey-creator-core.min.css" type="text/css" rel="stylesheet">
<script src="https://unpkg.com/survey-creator-core@1.12.8/survey-creator-core.min.js"></script>
<script src="https://unpkg.com/survey-creator-js@1.12.8/survey-creator-js.min.js"></script>
<link href="https://unpkg.com/survey-analytics@1.12.8/survey.analytics.min.css" rel="stylesheet">
<script src="https://unpkg.com/survey-analytics@1.12.8/survey.analytics.min.js"></script>
<script src="https://unpkg.com/survey-pdf@1.12.8/survey.pdf.min.js"></script>