Problems with thank you on Mailform

Hello,
I use the snippet from Bastian on Gist for the ”Thank you“ state I use a not visible content, also in multilanguage.
This works fine. But now I want to show the mailform again. But if I load the contactform snippet in the thank-you template i got an error that I have the undefinied variable alert.
But on the thank-you template I do the same as on the normal mailform template like in the original Gist-snippet.

Can someone help me?

Cheers,
Jan

Have you been able to solve this problem?

Hi,
no. I deleted the reopen form because I need to bring the website online.
But if somebody can find a solution no hassle to write it down here :).