How to stop changing a field in edit mode