made addFieldAttributes public to enable easy definition of cutsom fields