trying to save data into fields on click