diff --git a/recipes/templates/recipe-form.html b/recipes/templates/recipe-form.html index 663bb3c..ba703a1 100644 --- a/recipes/templates/recipe-form.html +++ b/recipes/templates/recipe-form.html @@ -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}`); }