Redirecting to a thank you page doesn't work for me

I followed the instructions in the FAQ about redirecting to a thank you page and the appointment get booked and the page refreshes . Is there any other setting I need to change to make it work?

I inserted the code to wp-content/themes/my-theme/functions.php
I am not a programer - I put the code at the bottom of functions.php

Thank you,