Clear input when you navigate to a new screen

Clear input when you navigate to a new screen.

My situation is that I have a list of “tasks” and I go to a “task details” screen when a task is clicked. On this tasks details screen, I have text input fields with a default values set to “current task name” and “current task info”. This allows users to edit the name and info. When they click back, it will update the “task” record. The problem is, when I click into another “task” to see its “task details,” the text inputs are showing the first task’s information instead of this new task’s. I’m assuming this is because inputs don’t clear when you navigate to a new screen.