form is giving an error when I go to edit