Note: because this example form does not actually send out any emails, the redirect is triggered by listening to the wpcf7mailfailed event. If you want to use this code on your own website, you need to change this to wpcf7mailsent instead.