I didn't read all codes but make sure the auto fill still works when you enter into edit form page.