Log key-value pairs of data and reset form after clicking submit button.