issue with form on submission - getting an error