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

Closing form after sent in lightbox

5 months 3 weeks ago #1

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
Hi!
URL: supplym.ru/catalog/aviacionnoe-maslo

This form display when click on button "Купить". I need close form after it sent. How I can do it? I'm using the last version of component.

5 months 3 weeks ago #2

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

You need at the code editor, to add the JS code:
jQuery(document).on('success-submit', '.ba-form-lightbox-layout', function(){
	jQuery(this).formsModal('hide');
});

Best Regards,
Vyacheslav, Balbooa Support Team

5 months 3 weeks ago #3

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
Thanks very much, it work.

And one more question. If I'll try send another form after first sent, checkbox Terms and Conditions not checked. How I can checked it always?

5 months 3 weeks ago #4

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12772
There is no such opportunity, because
after sending, all fields are cleared

Best Regards,
Vyacheslav, Balbooa Support Team

5 months 3 weeks ago #5

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
Maybe it can make reload form with JS?

5 months 3 weeks ago #6

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12772
For this you need to add this JS code
jQuery(document).on('success-submit', '.custom-form', function(){
    jQuery(this).find('.ba-form-acceptance-field input[type="checkbox"]').prop('checked', true);
});

Best Regards,
Vyacheslav, Balbooa Support Team

5 months 3 weeks ago #7

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
I'll try, but not working this JS

5 months 3 weeks ago #8

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12772
Specify in what form you added the code?

Best Regards,
Vyacheslav, Balbooa Support Team

5 months 3 weeks ago #9

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
The current: prnt.sc/s8j4m9

5 months 3 weeks ago #10

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12772
You need to add a class custom-form for the form.

Best Regards,
Vyacheslav, Balbooa Support Team

5 months 3 weeks ago #11

  • Vladimir's Avatar
  • Vladimir
  • Posts: 22
Thanks, now it work

5 months 3 weeks ago #12

  • Vyacheslav's Avatar
  • Vyacheslav
  • Posts: 12772
You are welcome.

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