Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

if I have two form in a page. How can I call bouncerFormValid two times for 2 form? #52

Open
nFnK opened this issue Jan 5, 2020 · 1 comment

Comments

@nFnK
Copy link

nFnK commented Jan 5, 2020

Hello,
I would like to use two form in a page. But I do not know how can call bouncerFormValid two time ?
For example

  1. form id #form1
  2. form id #form2

document.addEventListener('bouncerFormValid', function (event) { var form = event.target; }, false);

@nFnK nFnK changed the title if Ihave two form if Ihave two form in a page. How can I use bouncerFormValid ? Jan 5, 2020
@nFnK nFnK changed the title if Ihave two form in a page. How can I use bouncerFormValid ? if I have two form in a page. How can I use bouncerFormValid ? Jan 5, 2020
@nFnK nFnK changed the title if I have two form in a page. How can I use bouncerFormValid ? if I have two form in a page. How can I call bouncerFormValid two times for 2 form? Jan 5, 2020
@nFnK
Copy link
Author

nFnK commented Jan 5, 2020

I did it. These is works

$(document).on('bouncerFormValid', '#form1', function(e) {
e.preventDefault();
alert('1 Form submitted successfully!');
});

$(document).on('bouncerFormValid', '#form2', function(e) { e.preventDefault(); alert('2 Form submitted successfully!'); });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant