Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
super.updateValidationMessage(validationMessage, state);
}
}
subscribe() {
super.subscribe();
// add listener for invalid event
this._model.subscribe((action) => {
let state = action.target.getState();
this.updateValidationMessage(this._model.errorMessage, state);
}, "invalid");
}
}


Expand Down
3 changes: 2 additions & 1 deletion jsdocs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 30 additions & 23 deletions ui.frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ui.frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"webpack-merge": "^5.8.0"
},
"dependencies": {
"@aemforms/af-core": "^0.22.76",
"@aemforms/af-formatters": "^0.22.76",
"@aemforms/af-core": "^0.22.78",
"@aemforms/af-formatters": "^0.22.78",
"@aemforms/af-custom-functions": "1.0.6"
}
}
6 changes: 5 additions & 1 deletion ui.frontend/src/view/FormContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ class FormContainer {
*/
getParentFormElementId(model) {
const parentModel = (model.fieldType && model.repeatable) ? model.parent.parent : model.parent;
return parentModel.id;
if (parentModel.fieldType === 'form') {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required due to @arunattri26's recent change in the last af-core release

return '$form';
} else {
return parentModel.id;
}
}

/**
Expand Down
9 changes: 6 additions & 3 deletions ui.tests/test-module/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ describe("Form Runtime with Custom Text Input", () => {
const [submitbutton1, fieldView] = Object.entries(formContainer._fields)[11];

// Required field should not show error on blur due to custom text field
cy.get(`#${textbox6}`).find("input").focus().clear().type("abc").blur().then(x => {
cy.get(`#${textbox6}`).find("input").focus().clear().blur().then(x => {
cy.get(`#${textbox6}`).find(".cmp-adaptiveform-textinput__errormessage").should('have.text',"")
})

Expand All @@ -125,8 +125,7 @@ describe("Form Runtime with Custom Text Input", () => {
cy.get(`#${textbox8}`).find("input").then(x => {
cy.get(`#${textbox8}`).find(".cmp-adaptiveform-textinput__errormessage").should('have.text',"Please lengthen this text to 12 characters or more.")
})
debugger;
cy.get(`#${textbox6}`).find("input").focus().clear().blur().then(x => {
cy.get(`#${textbox6}`).find("input").then(x => {
cy.get(`#${textbox6}`).find(".cmp-adaptiveform-textinput__errormessage").should('have.text',"Please fill in this field.")
})

Expand Down