Getting value of an HiddenField inserting it from template - Flask <p>I'm a newbie in Python/Flask programmation and I'm having some problems to return the value of my HiddenField inserting it from my template.</p> <p>This my Form Class:</p> <pre><code>class DownloadForm(Form): link = HiddenField() download = SubmitField('Download') </code></pre> <p>And this is my template "Material" with a table in which I put my materials from DB and where I'm trying to put the value of the HiddenField:</p> <pre><code> &lt;tbody&gt; {% for mat in materials %} &lt;tr&gt; &lt;td&gt;{{ mat.author }}&lt;/td&gt; &lt;td&gt;{{ mat.title }}&lt;/td&gt; &lt;td&gt;{{ mat.subject }}&lt;/td&gt; &lt;td&gt;{{ mat.description }}&lt;/td&gt; &lt;td&gt;{{ mat.faculty }}&lt;/td&gt; &lt;td&gt;{{ mat.professor }}&lt;/td&gt; &lt;td&gt; &lt;select class="form-control"&gt; &lt;option&gt;1&lt;/option&gt; &lt;option&gt;2&lt;/option&gt; &lt;option&gt;3&lt;/option&gt; &lt;option&gt;4&lt;/option&gt; &lt;option&gt;5&lt;/option&gt; &lt;/select&gt; &lt;/td&gt; &lt;form method="POST" enctype="multipart/form-data" action={{url_for('download')}}&gt; {{ formDownload.link(value = '{{mat.link}}')}} &lt;td&gt;{{ formDownload.download }}&lt;/td&gt; &lt;/form&gt; &lt;td&gt;{{ formDelete.delete }}&lt;/td&gt; &lt;/tr&gt; {% endfor %} &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>The problem is in this line of code where I would like to insert the HiddenField value. </p> <pre><code>{{ formDownload.link(value = '{{mat.link}}')}} </code></pre> <p>I want to insert the value here because every SubmitField is linked with a specific row of the table. The variable <strong>mat.link</strong> contains the url of the material that users want to download but I can't get this value with the function form.request['link'].</p> <p>Here there's my function download when form is submitted:</p> <pre><code>@app.route('/download', methods=['GET', 'POST']) def download(): form = DownloadForm(csrf_enabled=False) if form.validate_on_submit(): link = request.form['link'] return redirect(url_for('download', filename=link)) </code></pre> <p>I've tried to debug my application and the <em>variable link</em> results equal to <em>"mat.link"</em> as a string . Can someone help me please ? Thanks</p>