Я новичок в Modals, у меня есть форма, и когда пользователь нажимает кнопку submit, он покажет Modal, подтверждающий, хочет ли пользователь отправить, модальный также содержит пользовательский ввод из полей формы. Я искал по всему Интернету, но не могу найти правильный ответ на мои потребности. И все, что я вижу, это то, что они отмечают событие click, чтобы открыть модальную ссылку. У меня есть входной тип submit. Можете ли вы привести примеры или идеи? Благодарю! Вот моя форма образца.
<form role="form" id="formfield" action="inc/Controller/OperatorController.php" method="post" enctype="multipart/form-data" onsubmit="return validateForm();">
<input type="hidden" name="action" value="add_form" />
<div class="form-group">
<label>Last Name</label><span class="label label-danger">*required</span>
<input class="form-control" placeholder="Enter Last Name" name="lastname" id="lastname">
</div>
<div class="form-group">
<label>First Name</label><span class="label label-danger">*required</span>
<input class="form-control" placeholder="Enter First Name" name="firstname" id="firstname">
</div>
<input type="submit" name="btn" value="Submit" id="submitBtn" class="btn btn-default" data-confirm="Are you sure you want to delete?"/>
<input type="button" name="btn" value="Reset" onclick="window.location='fillup.php'" class="btn btn-default" data-modal-type="confirm"/>
</form>