You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% for field in form.paste %}
<p>
{{ field.filename(placeholder='Filename') }}
</p><p>
{{ field.value(wrap='off') }}
</p>
{% endfor %}
<form>
I found on reddit, that format is <form_variable_name>-<id_number> for creating new entries. So I added it, but I just got new blank form in FieldList. First question: Why there is no information about this in documentation? Second question: Why below html just adds blank form to FieldList with blank filename and value ? (see result below)
This is an output if I am filling all 2 forms: [{'filename': 'test.py', 'value': "print()", 'csrf_token': None}, {'filename': None, 'value': None, 'csrf_token': None}]
As you can see only first form has values
What I expected to see?
Documentation about this feature
filename and value filled with values
Environment
Python version: 3.11.9
wtforms version: 3.1.2
The text was updated successfully, but these errors were encountered:
Lopkop
changed the title
adding entries to FieldList
Adding entries to FieldList
Jul 16, 2024
Actual Behavior
This is my fields and html code:
I found on reddit, that format is <form_variable_name>-<id_number> for creating new entries. So I added it, but I just got new blank form in FieldList.
First question: Why there is no information about this in documentation?
Second question: Why below html just adds blank form to FieldList with blank
filename
andvalue
? (see result below)This is an output if I am filling all 2 forms:
[{'filename': 'test.py', 'value': "print()", 'csrf_token': None}, {'filename': None, 'value': None, 'csrf_token': None}]
As you can see only first form has values
What I expected to see?
filename
andvalue
filled with valuesEnvironment
The text was updated successfully, but these errors were encountered: