Save user form input data in a JavaScript object