My task is to submit a contact form via AJAX and then to show a "Thank you for submission!" message, loaded in place where the form was. So I need to ajaxify existing contact form.
I found some examples of how to validate form fields using AJAX in D8, but I can't find any example of how to implement an ajax form submission and load some content via AJAX then.
How can I implement my task? How should I alter the contact form to add the required functionality?