diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-03 23:45:31 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2021-06-03 23:45:31 +0530 |
commit | bbbf94169e0dddd88790c0907729a5f257f5ef5b (patch) | |
tree | c7cd7b757dd67d4bd6863b76980b87405f85a77a /app | |
parent | 42f0febd38f0427f33994b153c1a1d937afb609c (diff) |
added form helper
Diffstat (limited to 'app')
-rw-r--r-- | app/templates/_formhelpers.html | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/templates/_formhelpers.html b/app/templates/_formhelpers.html new file mode 100644 index 0000000..1aa63d0 --- /dev/null +++ b/app/templates/_formhelpers.html @@ -0,0 +1,12 @@ +{% macro render_field(field) %} + <dt>{{ field.label }} + <dd>{{ field(class="form-control",**kwargs)|safe }} + {% if field.errors %} + <ul class=errors> + {% for error in field.errors %} + <li>{{ error }}</li> + {% endfor %} + </ul> + {% endif %} + </dd> +{% endmacro %}
\ No newline at end of file |