% if c.form_errors and len(c.form_errors) > 0:
<div id="form-errors">
<p>The following errors occurred:</p>
<ul>
% for field, message in c.form_errors.iteritems():
<li>${message}</li>
% endfor
</ul>
</div>
% else:
<div id="form-errors" class="hidden">
% endif