title: Is there a way to dynamically populate a value field in Flask-WTF form?
body: <p>I have a <code>create</code> and an <code>update</code>
   notes views.
  Each view has the same form to create/update a note. </p>
  
  <p>I was wondering <strong>on a good way to render the value of my content only in the update view but not in the create view.</strong></p>
  
  <p>Here what I have today : </p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div class="field"&gt;
      {{ form.title.label }}
      {% if request.endpoint == 'notes.update' %}
          &lt;div class="control"&gt;
              {{ form.title(class="input", value=note.title) }}
          &lt;/div&gt;
      {% else %}
          &lt;div class="control"&gt;
              {{ form.title(class="input"}}
          &lt;/div&gt;
      {% endif %}
  &lt;/div&gt;
  </code></pre>
  
  <p>I use a condition on the endpoint to do what I want but I don't think it's a good way to do this.</p>
  
  <p>Thank you for help </p>