How can I conditionally change the thank you message?