Add custom fields to templates