A
A
Arthur Levenson2021-05-20 13:02:36
MODX
Arthur Levenson, 2021-05-20 13:02:36

How to clear input after closing modal window?

how to clear input after closing modal window. Ajaxform + format is used.

inputs should be cleared after closing the modal, not after reloading the page

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Tarasov, 2021-05-20
@kiskiskit

in the AjaxForm call, specify the following in the `&successMessage` parameter:

successMessage=`Ваше сообщение успешно отправлено <script>document.getElementById('xxx').reset(); </script>`
, where "xxx" is the ID of your form from the modal window. Well, or similar implement through jQuery or whatever you have.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question