[Fixed]-Setting initial values for more then one form

1👍

Fixed it myself.

for items in locationdata:

    name = items[1]
    form = GroupAddForm(request.POST or None, initial={"page_name": name})
    forms.append(form)


    <form method="POST" action=""> {% csrf_token %}
     {% for items in forms %}
       {{items}}

     {% endfor %}
     </form>
👤dk1990

Leave a comment