R
R
RushV2019-10-03 14:08:58
MODX
RushV, 2019-10-03 14:08:58

How to close modal window on form submission?

Hello!
I use bootstrap 4 modal window
formit, AjaxForm
There is a form

<form id="orderForm" method="post" action="" enctype="multipart/form-data">
<div class="input-group mb-2 border border-warning">
  <div class="input-group-prepend">
  <span class="input-group-text border-danger" id="basic-addon1"><i class="fas fa-user"></i></span>
  </div>
  <input type="text" class="form-control" name="text-name" value="" placeholder="Ваше Имя, Наименование организации" aria-label="Ваше Имя, Наименование организации" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-2 border border-warning">
  <div class="input-group-prepend">
  <span class="input-group-text border-danger" id="basic-addon1"><i class="fas fa-envelope"></i></span>
  </div>
  <input type="email" class="form-control" required name="email" value="" placeholder="E-mail" aria-label="E-mail" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-2 border border-warning">
  <div class="input-group-prepend">
  <span class="input-group-text border-danger" id="basic-addon1"><i class="fas fa-phone"></i></span>
  </div>
  <input type="text" class="form-control" name="tel" value="" placeholder="Контактный телефон" aria-label="Контактный телефон" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-2 border border-warning">
  <div class="input-group-prepend">
  <span class="input-group-text border-danger"><i class="fas fa-marker"></i></span>
  </div>
  <textarea class="form-control" name="text-textarea" aria-label="With textarea" placeholder="Ваше сообщение..."></textarea>
</div>
<div class="form-group mb-2 border">
  <input type="file" class="form-control-file" name="contact_attachment" value="" id="exampleFormControlFile2">
</div>
<div class="text-center mt-4">
 <button type="submit" class="btn bg-orange px-4">Отправить</button>
</div>
</form>


5d95d6c1dfc26441636171.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Lyskov, 2019-10-03
@Vlatqa

there is an af_complete event, catch it and close the modal

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question