Data input save function.