Answers.Body: <p>Not an answer, but one thing that might help you diagnose the problem, is to output all the return errors (without having to define it on each field as the example templates do).</p>
  
  <pre><code>{% macro errorList(errors) %}
      {% if errors %}
          &lt;ul class="errors"&gt;
              {% for error in errors %}
                  &lt;li&gt;{{ error }}&lt;/li&gt;
              {% endfor %}
          &lt;/ul&gt;
      {% endif %}
  {% endmacro %}
  
  {% from _self import errorList %}
  
  {% if account is defined %}
      {{ errorList(account.getAllErrors()) }}
  {% endif %}
  
  {% if entry is defined %}
      {{ errorList(entry.getAllErrors()) }}
  {% endif %}
  </code></pre>
  
  <p>A User Model named 'account' is returned by default from a failed <code>users/saveUser</code> post action, and an Entry Model named 'entry' is returned by default from a failed <code>entries/saveEntry</code> post action.</p>
  
  <p>I have also found the <a href="http://straightupcraft.com/craft-plugins/inspector" rel="nofollow">Inpector</a> plug-in extremely helpful. You can then add <code>{{ account | inspect }}</code> or <code>{{ entry | inspect }}</code> within the <code>if</code> statements above to get more info.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-09-26T20:54:07.950Z
Answers.LastActivityDate: 2014-09-26T20:59:49.720Z
Answers.LastEditDate: 2014-09-26T20:59:49.720Z
Answers.UserDisplayName: Douglas McDonald
Body: <p>Our client wants a poll on the website.
  How can I deal with client input and update the entry?
  I found the <a href="http://buildwithcraft.com/docs/templating/entry-form" rel="nofollow">Entry-Form example</a>, but this doesn't work. </p>
  
  <p>The title field is the question and the admin can add answers with a matrix field. Within the matrix fields there are 2 fields: answer and totalVotes </p>
  
  <p>This is my code:</p>
  
  <pre class="lang-twig prettyprint-override"><code>&lt;form class="poll__questions" method="post" action="" accept-charset="UTF-8"&gt;
      &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
      &lt;input type="hidden" name="redirect" value="{{ craft.request.getPath }}?success=√"&gt;
      &lt;input type="hidden" name="sectionId" value="38"&gt;
      &lt;input type="hidden" name="entryId" value="{{ pollentry.id }}"&gt;
      &lt;input type="hidden" name="enabled" value="1"&gt;
  
      &lt;ul&gt;
      {{% for answer in pollentry.answers %}
          &lt;li&gt;&lt;label&gt;&lt;input type="radio" name="fields[answers][{{ answer.id }}][fields][totalVotes]" value="{{ answer.totalVotes + 1 }}"&gt; {{ answer.answer }}&lt;/label&gt;&lt;/li&gt;
      {% endfor %}}
      &lt;/ul&gt;
      &lt;button type="submit" class="button button--third"&gt;Vote&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Does anybody know why this doesn't work. It submits the form without visible errors, but it doens't update the entry.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-01T09:48:37.410Z
Comments.Text: The EntryModel is likely failing validation somewhere.  If it is, and you check your craft/storage/runtime/logs folder, you can see where that is happening.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-12T05:45:07.940Z
Comments.Text: Did the logs help you identify your problem?
Comments.UserDisplayName: Tyler Willingham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-13T09:19:37.033Z
Comments.Text: No this didn't help me with my problem. I solved it with a plugin and not with matrix fields, but with normal fields.
Comments.UserDisplayName: sneeky
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2014-07-13T21:33:50.003Z
Comments.Text: @sneeky Would you mind sharing your solution as an answer? Asking and answering your own questions is totally legit!
Comments.UserDisplayName: Matt Stein
Tags: <entries><updating>
Title: How to deal with client input your site?
ThreadText: # How to deal with client input your site?
  
  (Asked by: username_0 on 2014-07-01)
  
  Our client wants a poll on the website.
  How can I deal with client input and update the entry?
  I found the [Entry-Form example](http://buildwithcraft.com/docs/templating/entry-form), but this doesn't work.
  
  The title field is the question and the admin can add answers with a matrix field. Within the matrix fields there are 2 fields: answer and totalVotes
  
  This is my code:
  
  ```twig
  <form class="poll__questions" method="post" action="" accept-charset="UTF-8">
      <input type="hidden" name="action" value="entries/saveEntry">
      <input type="hidden" name="redirect" value="{{ craft.request.getPath }}?success=√">
      <input type="hidden" name="sectionId" value="38">
      <input type="hidden" name="entryId" value="{{ pollentry.id }}">
      <input type="hidden" name="enabled" value="1">
  
      <ul>
      {{% for answer in pollentry.answers %}
          <li><label><input type="radio" name="fields[answers][{{ answer.id }}][fields][totalVotes]" value="{{ answer.totalVotes + 1 }}"> {{ answer.answer }}</label></li>
      {% endfor %}}
      </ul>
      <button type="submit" class="button button--third">Vote</button>
  </form>
  
  ```
  
  Does anybody know why this doesn't work. It submits the form without visible errors, but it doens't update the entry.
  
  **Tags:** entries, updating
  
  > **Comments:**
  > **username_1**: The EntryModel is likely failing validation somewhere.  If it is, and you check your craft/storage/runtime/logs folder, you can see where that is happening.  
  > **username_2**: Did the logs help you identify your problem?  
  > **username_0**: No this didn't help me with my problem. I solved it with a plugin and not with matrix fields, but with normal fields.  
  > **username_3**: @username_0 Would you mind sharing your solution as an answer? Asking and answering your own questions is totally legit!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2014-09-26. Score: 2
  
  Not an answer, but one thing that might help you diagnose the problem, is to output all the return errors (without having to define it on each field as the example templates do).
  
  ```
  {% macro errorList(errors) %}
      {% if errors %}
          <ul class="errors">
              {% for error in errors %}
                  <li>{{ error }}</li>
              {% endfor %}
          </ul>
      {% endif %}
  {% endmacro %}
  
  {% from _self import errorList %}
  
  {% if account is defined %}
      {{ errorList(account.getAllErrors()) }}
  {% endif %}
  
  {% if entry is defined %}
      {{ errorList(entry.getAllErrors()) }}
  {% endif %}
  
  ```
  
  A User Model named 'account' is returned by default from a failed `users/saveUser` post action, and an Entry Model named 'entry' is returned by default from a failed `entries/saveEntry` post action.
  
  I have also found the [Inpector](http://straightupcraft.com/craft-plugins/inspector) plug-in extremely helpful. You can then add `{{ account | inspect }}` or `{{ entry | inspect }}` within the `if` statements above to get more info.
  
  
  ---
  
  