AUI-1794 Refactor the rendering logic of each field into a render function