Why does my form skip to a new page?