functions for displaying document fields appropriately