Here I am using vue.js. And in vue.js I have used local storage to temporarily stored the user entered value in the form fields. So everything is working fine here but the issue is while i dont have any value in the form fields it is giving undefined as place holder. So where I am going wrong please let me know. Below is my code/
schema_Real_Estate: {
fields: [{
type: "input",
inputType: "text",
placeholder: "Garages",
required: true,
model: "Garages",
styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
}, {
type: "input",
inputType: "text",
placeholder: "Basement",
required: true,
model: "Basement",
styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
}, {
type: "input",
inputType: "text",
placeholder: "Roof",
required: true,
model: "Roof",
styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
}, {
type: "input",
inputType: "text",
placeholder: "Exterior",
required: true,
model: "Exterior",
styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
}, {
type: "input",
inputType: "text",
placeholder: "Cooling",
required: true,
model: "Cooling",
styleClasses: ["half-width col-xs-12 col-sm-6", "job_title"]
}, {
type: "input",
inputType: "text",
placeholder: "Heating",
required: true,
model: "Heating",
styleClasses: ["half-width col-xs-12 col-sm-6", "Experience"]
}, {
type: "input",
inputType: "text",
placeholder: "Elementary school",
required: true,
model: "Elementary_school",
styleClasses: ["half-width col-xs-12 col-sm-4", "job_title"]
}, {
type: "input",
inputType: "text",
placeholder: "Middle school",
required: true,
model: "Middle_school",
styleClasses: ["half-width col-xs-12 col-sm-4", "Experience"]
}, {
type: "input",
inputType: "text",
placeholder: "High school",
required: true,
min: '',
model: "High_school",
styleClasses: ["half-width col-xs-12 col-sm-4", "job_title"]
}]
},
if (localStorage.Garages) {
this.model.Garages = localStorage.Garages;
}
if (localStorage.Roof) {
this.model.Roof = localStorage.Roof;
}
if (localStorage.Exterior) {
this.model.Exterior = localStorage.Exterior;
}
if (localStorage.Cooling) {
this.model.Cooling = localStorage.Cooling;
}
if (localStorage.Heating) {
this.model.Heating = localStorage.Heating;
}
if (localStorage.Elementary_school) {
this.model.Elementary_school = localStorage.Elementary_school;
}
if (localStorage.Middle_school) {
this.model.Middle_school = localStorage.Middle_school;
}
if (localStorage.High_school) {
this.model.High_school = localStorage.High_school;
}
if (localStorage.Make) {
this.model.Make = localStorage.Make;
}
if (localStorage.Model) {
this.model.Model = localStorage.Model;
}
if (localStorage.Year) {
this.model.Year = localStorage.Year;
}
if (localStorage.Capacity) {
this.model.Capacity = localStorage.Capacity;
}
if (localStorage.Color) {
this.model.Color = localStorage.Color;
}
if (localStorage.Type) {
this.model.Type = localStorage.Type;
}
if (localStorage.Condition) {
this.model.Condition = localStorage.Condition;
}
if (localStorage.Other_spec) {
this.model.Other_spec = localStorage.Other_spec;
}
if (localStorage.Name) {
this.model.Name = localStorage.Name;
}
if (localStorage.Breed) {
this.model.Breed = localStorage.Breed;
}
if (localStorage.Gender) {
this.model.Gender = localStorage.Gender;
}
if (localStorage.Age) {
this.model.Age = localStorage.Age;
}
if (localStorage.Trained) {
this.model.Trained = localStorage.Trained;
}
if (localStorage.Other_details) {
this.model.Other_details = localStorage.Other_details;
}
},
localStorage.Garages = this.model.Garages;
localStorage.Roof = this.model.Roof;
localStorage.Exterior = this.model.Exterior;
localStorage.Cooling = this.model.Cooling;
localStorage.Heating = this.model.Heating;
localStorage.Elementary_school = this.model.Elementary_school;
localStorage.Middle_school = this.model.Middle_school;
localStorage.High_school = this.model.High_school;
localStorage.Make = this.model.Make;
localStorage.Model = this.model.Model;
localStorage.Year = this.model.Year;
localStorage.Capacity = this.model.Capacity;
localStorage.Color = this.model.Color;
localStorage.Type = this.model.Type;
localStorage.Condition = this.model.Condition;
localStorage.Other_spec = this.model.Other_spec;
localStorage.Name = this.model.Name;
localStorage.Breed = this.model.Breed;
localStorage.Gender = this.model.Gender;
localStorage.Age = this.model.Age;
localStorage.Trained = this.model.Trained;
localStorage.Other_details = this.model.Other_details;

localStorageobject. instead usesetItem()andgetItem()to store and retrieve data.