{% extends "base.html" %} {% block content %} {% if id %} <h2>Editing Chemical {{id}}</h2> {% endif %} {% if invalid %} <p style="color: red;">Invalid Form!</p> {% endif %} {% if success %} <p style="color: green;">Success!</p> {% endif %} <form method="post"> <table> {% for field in form %} <tr> <td> <strong> {{ field.label }}{% if field.flags.required %}*{% endif %} </strong> </td> <td> {{ field }} </td> </tr> {% endfor %} </table> <input type="submit" value="Submit"> </form> {% endblock %}