Updated field render logic to handle view fields as well as edit fields