Prevent Modal From Closing During On Click Handler

0

Somewhat related to my previous question. Except I can't find the solution to this one.

We have pre-defined notes for the payment note field. To enable these, I have placed <button>s below the note field. The intent is for the users to be able to click on a button and have it fill in the note field with that pre-defined note.

This is a simple task in a test page.

However, the problem I'm having is, when a button is clicked, the payment window closes.

Do you know how I can add in an on click handler that won't close the payment modal?

Question Resolved For: Simple Invoice Manager - Invoicing Made Easy 0 Votes 1 Answers 112 Views
Asked by Scott Smith 2 years ago

0

Answered by Mian Saleem 2 years ago

Hello,

If the button is on modal, then it should not close the modal unless it's a submit button. You can set the type="button"

If you want to disable backdrop, you can add data-backdrop attribute to the modal div.

Thank you

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.