In my app I want to check an input field e.g username if it's exists or not before continue my in form.
I'm using Flask jinja2 for templating. Here is a piece of my code:
<form method="POST" action="">
<div class="row">
<div class="form-group col-lg-9 col-md-9 col-sm-9">
<label for="inputUsername">User Name</label>
{{ render_field(form.username, class="form-control rounded" onkeyup="checkUserName()") }}
</div>
Of course the onkeyup attribut does not work, my question how to perform it ?
Thanks