According to bootstrap I should be able to add "data-backdrop="static" and data-keyboard="false" to the modal div and that should make it so that the modal can't be dismissed. However this isn't working. It also doesn't work if I add it to the javascript as an option inside modal.show().
I need some way so that the modal I show on load does not get dismissed until the form in modal is submitted. Here's my code...
<div class="modal-on-load" data-target="#checkInModal" data-keyboard="false" data-backdrop="static"></div>
<div class="modal2 checkin-widget mfp-hide" id="checkInModal">
<div class="block dark divcenter" style="background: 0% 0% / cover no-repeat; max-width: 700px; height: 400px;" data-height-xl="400">
<div id="questions" class="questions">
<div class="content container">
<div class="title-block promo promo-dark promo-uppercase m-0" style="padding: 30px 30px 30px 30px;">
<div class="row">
<div class="col-sm-6">
<h4 style="padding-top: 15px;">Access Codes Needed</h4>
</div>
<div class="col-sm-6">
<img src="../images/cobrand-logo5.png" width="250" alt="InformedDNA & Aetna" style="float: right">
</div>
</div>
</div>
<div class="block divcenter mt-4" style="background-color: #FFF; max-width: 500px;">
<form class="row" id="checkin-form" action="#" method="post" enctype="multipart/form-data" novalidate="novalidate" _lpchecked="1">
<div class="container">
<div class="row">
<div id="referral-code" class="col-5 form-group">
<div>
<label for="checkin-form-referral-code">Referral Code:</label>
<input type="text" name="feedback-form-name" id="checkin-form-referral-code" class="form-control required valid" value="<?=$pathinfo?>" placeholder="Enter Referral Code">
</div>
<div class="help-block with-errors"></div>
</div>
<div id="group-id" class="col-5 form-group">
<div>
<label for="checkin-form-group-id">Aetna Group ID:</label>
<input type="text" name="feedback-form-name" id="checkin-form-group-id" class="form-control required valid" value="" placeholder="Enter Aetna Group ID">
</div>
<div class="help-block with-errors"></div>
</div>
<div class="col-2 form-group center">
<label> </label>
<button id="validateCheckIn" class="btn btn-success">Submit</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>