Save inputs to database and refill forms on load