locomotivecms / documentation

The website sources about the new LocomotiveCMS documentation "center"
51 stars 120 forks source link

customer_message.errors is always true on commit #168

Open ulitiy opened 9 years ago

ulitiy commented 9 years ago

http://doc.locomotivecms.com/guides/create-a-contact-form

{% if customer_message.errors %} will always be true, so that example is incorrect. It works only because of different success/error callbacks.

ulitiy commented 9 years ago

So the temporary solution is to use

  {% capture err %}{{ customer_message.errors | first}}{% endcapture %}
  {% if err != "" %}

that doesn't seem right