Empty value of new ingredient input

This commit is contained in:
Benjamin 2023-03-25 09:29:47 +01:00
parent 446486bf0d
commit 41d346d56a

View file

@ -51,6 +51,7 @@
newIngredientDiv.innerHTML = newIngredientDiv.innerHTML.replace(formRegex, `ingredient-${nextIngredientIndex}-`);
form.insertBefore(newIngredientDiv, addIngredientButton);
document.querySelector("#id_ingredient-" + nextIngredientIndex + "-text").value = "";
totalIngredientFormsInput.setAttribute('value', `${nextIngredientIndex + 1}`);
}