remove prefix multiple input

This commit is contained in:
BlasenhauerJ 2023-01-12 15:36:51 +01:00
parent 0f5a734300
commit bf1d19f33d
1 changed files with 18 additions and 0 deletions

View File

@ -378,6 +378,24 @@ class Multiple {
.getAttribute("setting-container")
.replace("SCHEMA", `${setNum}`);
ctnr.setAttribute("setting-container", newName);
//rename input
try {
const inp = ctnr.querySelector("input");
const newInpName = inp
.getAttribute("name")
.replace("_SCHEMA", "");
inp.setAttribute("name", newInpName);
inp.setAttribute("id", newInpName);
} catch (err) {}
//rename select
try {
const select = ctnr.querySelector("select");
const newInpName = select
.getAttribute("name")
.replace("_SCHEMA", "");
select.setAttribute("name", newInpName);
select.setAttribute("id", newInpName);
} catch (err) {}
});
} catch (err) {}