You have autoclose option which fires onClose callback after certain seconds of onSubmit event but is there a way that I can fire onClose event on some successful api request. For more clairty the scenario is -
when I click on submit button, some api request is made then on successfull response I want to close my typeform
Answered
Typeform Close Event
Best answer by picsoung
Hi
If you want to close the form automatically after it has been submitted you can use the autoClose option as described in our documentation here.
Once the form is submitted you can’t really go back and display an error in the form. In case you wanted to display an error if the API call failed.
So you probably need to make the API request in the onSubmit callback.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.