Answer the question
In order to leave comments, you need to log in
How to set the name of the form in the template?
Hello everyone
There is a form in the template:
<form action="/name.html" method="POST" enctype="multipart/form-data">
{{form.hidden_tag()}}
<p>Введите ваше Имя:</p>
{{form.name(class="send-form")}}
{% for error in form.errors.name %}
<span style="color:red;" class="flash-error">{{error}}</span>
{% endfor %}
{{form.name(class="send-form", name="bla")}}
html_params() got multiple values for keyword argument 'name'
Answer the question
In order to leave comments, you need to log in
Are you using Flask-WTF? If so, is it not possible to specify the name for the field when creating the form?
I assume you now have something like this:
class MyForm(Form):
name = StringField()
new_name = StringField()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question