Why isn't my form redirecting to a webpage when I set the condition?