Save data on input change