auto filling input fields for edit