added optional parameter to save infowindow fields in a custom attr