Empty value of new ingredient input
This commit is contained in:
parent
446486bf0d
commit
41d346d56a
|
|
@ -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}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue