I need to process some data before submitting the form. I am making an AJAX request inside “onFormSubmit”.
But if the AJAX fails the form should not be submitted. I can not make the request synchronous as it is deprecated.
Or if the form gets submitted before the AJAX request is complete I will loose those data. What would be the best way to process this?
Also I need to implement some google conversion code when the button gets clicked. Should I do it in the same section?