How to change the thank you page conditionally?