How not to wait for a server response when you submit the form (Contact form 7)?

I have integration with Bitrix CRM via curl, there's quite a lot of requests... to Create a lead, create a company, add contact, etc.

When you click send request if all fields are filled in correctly, the response from the server average wait 4 seconds..

An example of what the user sees (implemented with JS):

4 seconds is a lot..

How to make CF7 checked all the fields with JS and sent the data and not waiting for a response from the server and immediately said that everything is good?

If such implementation, what problems I may face in the future?
April 4th 20 at 13:28
2 answers
April 4th 20 at 13:30
Do not do so, the server can fall off and not process the data, and you have said that everything is OK. To let the user know that waiting is not in vain - block form and hang over it preloader.

Again, 4 seconds is the magic number. Tomorrow will be another server, or other processing in CRM and is 4 will 3 or 12. Take it away, don't embarrass the user.
April 4th 20 at 13:32
and immediately said that everything is good?

what problems I may face in the future?

with cheating if it's not good. The server may crash. Or stupid user gets to rebut.

Not worth it to cheat. Honestly, specify what is waiting for a response. Who likes cheating? But if dealing with finances and you also write that everything is good?
Yandex Analytics are not accept to show the preloader which is pretty darn slow. Until they rework the UI was faster.

Find more questions by tags WordPress