Skip to content

Commit

Permalink
update form-events (#157)
Browse files Browse the repository at this point in the history
Replace UIkit.ready => UIkit.util.ready
  • Loading branch information
germeni-giovanni authored Nov 14, 2024
1 parent 94a7b91 commit 37d6123
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/essentials-for-yootheme-pro/addons/forms/form-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ JavaScript events triggered by each form for which is possible to add listeners
Triggers before submission allowing to prevent the action.

```js
UIkit.ready(function () {
UIkit.util.ready(function () {
// local
UIkit.util.on('#form-id', 'form:submit', function (e) {
// e.preventDefault();
Expand All @@ -26,7 +26,7 @@ UIkit.ready(function () {
Triggers after submission, preventing the action is no longer possible.

```js
UIkit.ready(function () {
UIkit.util.ready(function () {
// local
UIkit.util.on('#form-id', 'form:submitted', function (e, ctx) {
// ctx = {response}
Expand All @@ -44,7 +44,7 @@ UIkit.ready(function () {
Trigger on submission error and validation error.

```js
UIkit.ready(function () {
UIkit.util.ready(function () {
// local
UIkit.util.on('#form-id', 'form:submission-error', function (e, ctx) {
// ctx = {error, errors, validation}
Expand Down

0 comments on commit 37d6123

Please sign in to comment.