Recalculate positions
This commit is contained in:
parent
4684694b7a
commit
227049ef4d
@ -177,11 +177,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addInput() {
|
function addInput() {
|
||||||
if (formLength >= 5) return;
|
const form = getForm(activeFormId);
|
||||||
|
if (form.inputs.length >= 5) return;
|
||||||
|
|
||||||
const input = {
|
const input = {
|
||||||
form_id: activeFormId,
|
form_id: activeFormId,
|
||||||
position: formLength + 1,
|
position: form.inputs.length + 1,
|
||||||
style: "1",
|
style: "1",
|
||||||
label: "",
|
label: "",
|
||||||
placeholder: "",
|
placeholder: "",
|
||||||
@ -189,7 +190,6 @@
|
|||||||
is_new: true,
|
is_new: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const form = getForm(activeFormId);
|
|
||||||
form.inputs = [...form.inputs, input];
|
form.inputs = [...form.inputs, input];
|
||||||
forms = forms;
|
forms = forms;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user