@formio/js 5.1.0-dev.6046.0d30acf → 5.1.0-dev.6047.b09c4ee
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/formio.form.js +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/form/Form.js +6 -0
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/form/Form.js +6 -0
- package/package.json +1 -1
package/lib/cjs/Wizard.js
CHANGED
@@ -602,7 +602,7 @@ class Wizard extends Webform_1.default {
|
|
602
602
|
}
|
603
603
|
this.redraw().then(() => {
|
604
604
|
this.checkData(this.submission.data);
|
605
|
-
this.triggerCaptcha(this.
|
605
|
+
this.triggerCaptcha(this.currentPanel.components);
|
606
606
|
const errors = this.submitted ? this.validate(this.localData, { dirty: true }) : this.validateCurrentPage();
|
607
607
|
if (this.alert) {
|
608
608
|
this.showErrors(errors, true, true);
|
@@ -392,6 +392,12 @@ class FormComponent extends Component_1.default {
|
|
392
392
|
// Iterate through every component and hide the submit button.
|
393
393
|
(0, utils_1.eachComponent)(form.components, (component) => {
|
394
394
|
this.hideSubmitButton(component);
|
395
|
+
if (component.validateWhenHidden) {
|
396
|
+
this.component.validateWhenHidden = true;
|
397
|
+
// Change original component as well, so it won't cause any custom logic to be continuously triggered
|
398
|
+
// because the original component does not have this property
|
399
|
+
this.originalComponent.validateWhenHidden = true;
|
400
|
+
}
|
395
401
|
});
|
396
402
|
// If the subform is already created then destroy the old one.
|
397
403
|
if (this.subForm) {
|
package/lib/mjs/Wizard.js
CHANGED
@@ -594,7 +594,7 @@ export default class Wizard extends Webform {
|
|
594
594
|
}
|
595
595
|
this.redraw().then(() => {
|
596
596
|
this.checkData(this.submission.data);
|
597
|
-
this.triggerCaptcha(this.
|
597
|
+
this.triggerCaptcha(this.currentPanel.components);
|
598
598
|
const errors = this.submitted ? this.validate(this.localData, { dirty: true }) : this.validateCurrentPage();
|
599
599
|
if (this.alert) {
|
600
600
|
this.showErrors(errors, true, true);
|
@@ -386,6 +386,12 @@ export default class FormComponent extends Component {
|
|
386
386
|
// Iterate through every component and hide the submit button.
|
387
387
|
eachComponent(form.components, (component) => {
|
388
388
|
this.hideSubmitButton(component);
|
389
|
+
if (component.validateWhenHidden) {
|
390
|
+
this.component.validateWhenHidden = true;
|
391
|
+
// Change original component as well, so it won't cause any custom logic to be continuously triggered
|
392
|
+
// because the original component does not have this property
|
393
|
+
this.originalComponent.validateWhenHidden = true;
|
394
|
+
}
|
389
395
|
});
|
390
396
|
// If the subform is already created then destroy the old one.
|
391
397
|
if (this.subForm) {
|