I thought I could json.stringify my form input with a specific id , but I suppose I cannot do it from outside of the file itself.
I have an input in my main UI file (.vue) but want to import it into a function in another js file that my button calls to.
If I try to pass that value from the homepage file with the same id as labeled in the form input, it still shows undefined error.
Am I incorrectly formatting the form itself with the ID? Do I need a $ prefix on the form ID? Thanks for any help in advance
home.vue
< input type=text value="InputAmount" id="forminput"/>
otherfile.js
async function({commit}, accountName) {
if (state.debug) {
console.log("Contribution");
}
try {
const publickey = state.accountData[0]["data"]["guard"]["keys"][0];
const accountName2 = localStorage.getItem("accountName");
const forminput = localstorage.getItem("forminput") //to come from home.vue input