Populate html form elements with data and return updated object