Fix the delete function for data entrty form

Fix the delete function for data entrty form