added formSubmit function to add JSON object to local storage