Mon. - Fri. 9 am - 5 pm Ask a Question
Remember me

to run a modal after submit a form

1 week 6 days ago #1

  • Michel Torres's Avatar
  • Michel Torres
  • Posts: 332
Hello,

I want to start a checkout with a Brazilian payment gateway, just after user submit the form.
Reference: codepen.io/pagarme/pen/YrgeLP

I want to show the modal, after submit the form, instead have to click again in the button (in reference).

Do you know what I have to do? I think "addEventListener" is the solution, but I can't realize how to do this with Forms.

Thank you

1 week 4 days ago #2

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 13549
Hello,

Thank you for contacting us!

You need to add a class custom-class for the button,

And use JS the code
sample code:
jQuery('.custom-class .ba-form-submit-btn').on('success-submit', function(){
    //your code here
});

Best Regards,
Vyacheslav, Balbooa Support Team

1 week 3 days ago #3

  • Michel Torres's Avatar
  • Michel Torres
  • Posts: 332
It's great Vyacheslav!

Can we also have something similar for a button plugin in Gridbox?

Thank you very much

1 week 3 days ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 13549
Hello,
Thank you for contacting us

Sample code:
jQuery('.custom-class .ba-form-submit-btn').on('click', function(event){
    event.preventDefault();
    //your code here
});

You need to replace .custom-class .ba-form-submit-btn with path to your button

Best Regards,
Vyacheslav, Balbooa Support Team
Powered by Kunena Forum