Add fields as attributes