I did manage to save multiple data into localStorage, know I want to call all the data from localStorage to the form. Below is the code to save it into local storage
function save() {
// Parse any JSON previously stored in allEntries
var existingEntries = JSON.parse(localStorage.getItem("allEntries"));
if(existingEntries == null) existingEntries = [];
var date = document.getElementById("date").value;
var brakes = document.getElementById("brakes").value;
var chain = document.getElementById("chain").value;
var seats = document.getElementById("seats").value;
var handlebars = document.getElementById("handlebars").value;
var entry =
{
"date": date,
"brakes": brakes,
"chain": chain,
"seats": seats,
"handlebars": handlebars
};
localStorage.setItem("entry", JSON.stringify(entry));
// Save allEntries back to local storage
existingEntries.push(entry);
localStorage.setItem("allEntries", JSON.stringify(existingEntries));
}