map fields in template