eduardotkoller/convForm

Is it possible to have delay before the form is submitted?

erikgyepes opened this issue · 2 comments

Let's say after every question is answerred I want to display one more message and submit the form after. Or even better, submit it in the background and leave the user with a message?

Additionally I also wonder how to deal with hidden fields that we need to post, but do not take them as questions

Hi, sorry for the delay.

If you want to send a request to an API or something at every question, there's an example that does exactly that -- see api_example.html. It's also possible to do that using callback functions on the already initialized forms, you just create the state in the same way you do like in the API example, inside the callback.

For hidden fields, you can append them on the form after the last question (using callbacks or using the eventList.onFormSubmit on the config object). You can also use this event to submit the form on the background and leave the user with a message.