To show a confirmation message, just go to Form Settings -> Confirmation Settings -> Only Message. Ane enter Your Message.
Now, to redirect the browser to another page after 5 seconds we will need to inject javascript code in your form.
So, upload a new javascript file to your host/server.
static_files/uploads/js/redirect.after.success.submit.js
With the following content:
$( document ).ready(function() {
formEl.on('success', function(event){
setTimeout(function () {
Utils.postMessage({
url: "https://easyforms.dev"
});
}, 5000)
});
});
Then go to Form Settings -> UI Settings -> Load Javascript File and Enter the absolute url to the uploaded file:
https://www.example.com/static_files/uploads/js/redirect.after.success.submit.js
Note: Don’t forget to use your domain name.
And that’s it! Now You can change the url and number of seconds (in miliseconds).
In this tutorial, we are interacting with the Form Widget (Using events). If you want to know more about this feature, I suggest reading our documentation,