Why my form is not functioning normally?