flask wtforms - How to keep past value after error in html? -


i have textarea form , want keep value user has inserted if error occurs when trying submit. i've tried works input type="text", when use textarea past value of field gone when error occurs. other questions related php apps, know when html?

<div class="form-group">     <label class="control-label col-sm-2" for="msg">message:</label>     <div class="col-sm-10">         <textarea type="text" rows="3" class="form-control" name="message" value="{{request.form.msg}}" id="msg" required></textarea>      </div> </div> 

just fixed it! putting {{request.form.msg}} in between , this:

<textarea type="text" rows="3" class="form-control" name="message" id="msg" required>{{request.form.msg}}</textarea> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -