Modal form parameters

Hello,

I need to add a couple of parameters when displaying (unhiding) a modal form. The requirement is to not allow the end user to close the modal form by clicking outside of the window or pressing the ESC key. I found this snippet on StackOverflow but cannot find anywhere in BSS to apply the parameters.

$('#myModal').modal({ backdrop: 'static', keyboard: false });   // That way, the modal won't close when click on grey area, nor when pressing Esc key. 

Link to w3school bootstrap modal options for backdrop

I cannot add it to the attributes and I cannot find any mention of parameters in the forum or tutorial sections for modal windows. If writing JS code is the only way, I can develop the code to do so as shown in the W3Schools example.

Any ideas would be appreciated.

Ben

You can add data-backdrop="false" and data-keyboard="false" to the modal activation button or link.

Its in the Bootstrap 4 documentation for modals.

https://getbootstrap.com/docs/4.3/components/modal/

Thank you, Twinstream! You saved the day once again. When I have some more cycles, I need to sit down and consume the BootStrap doc!

Have a wonderful day!

Ben