Since I don't know all of the fields (and field names) you originally used when implementing the .setItem() method, I'll have to base this off of my original code. I assume you'll be able to modify it to add any additional fields you want (or change field names if they are incorrect). Anyone, to load these fields back onto the form, you'd add something like this:
window.onload = function() {
if(localStorage !== null && localStorage !== undefined) {
document.forms[0]["name"].value = (localStorage.getItem("name") !== null && localStorage.getItem("name") !== undefined) ? localStorage.getItem("name") : "";
document.forms[0]["address"].value = (localStorage.getItem("address") !== null && localStorage.getItem("address") !== undefined) ? localStorage.getItem("address") : "";
// And so on...
}
}
Now, also because I don't know that your form has a 'name' or 'id' set, I can't directly identify your form, so I used a more relative method (document.forms index). This code may not work as-is, depending on if there are other forms on the page (and the order of the forms, if there are multiple). Also, make sure to match up the field names appropriately. Other than that, this code will automatically check to see if a value has been stored and if so, place it in the field.
Depending on the number of fields you are trying to save/load, this could be optimized by having an array of all the field names you wish to store, and looping through them (rather than doing it 1 per line).