Blog comment validation messages not showing
Noticed today that comment validation messages don't appear in the frontend (errors or success). For example, click submit without filling in the form: http://gravitydept.com/blog/a-way-forward/#comment-form
No error warnings appear, but they're coded into the template: blog.post.tpl
{% if message %}
<p class="respond-message">{{ message }}</p>
{% endif %}
{% if errors %}
<ul class="respond-errors">
{% for error in errors %}
<li>{{ error | textilize }}</li>
{% endfor %}
</ul>
{% endif %}
Comments are currently closed for this discussion. You can start a new one.
2 Posted by Jonathan Hoyt on 20 Feb, 2012 04:46 PM
Here's Brandon's comment form, I think he handles errors a bit differently.
Jonathan Hoyt closed this discussion on 20 Feb, 2012 04:46 PM.
Brendan Falkowski re-opened this discussion on 20 Feb, 2012 06:31 PM
3 Posted by Brendan Falkowski on 20 Feb, 2012 06:31 PM
Thanks Jonathan, found the fix. The {% if message %} and {% if errors %} must be inside the {% commentform %} declaration.
Would be really nice to have these form constraints and template tags documented over here: http://docs.harmonyapp.com/
John Nunemaker closed this discussion on 07 Mar, 2012 04:44 PM.