title: Why does Thymeleaf generate a wrong id?
body: <p>I created a form using Thymeleaf. This form contains a textfield and a label for it. But Thymeleaf does not assign the correct id to the <code>for</code> attribute of the label (or in fact it assigns the wrong id to the textfield).</p>
  
  <p>This is the template:</p>
  
  <pre><code>&lt;form action="#" th:action="@{/test}" th:object="${nameBean}" method="post"&gt;
  &lt;div class="form-group" th:classappend="${#fields.hasErrors('name')}? has-error"&gt;
      &lt;label class="control-label" th:for="${#ids.next('name')}"&gt;Name&lt;/label&gt;
      &lt;input type="text" class="form-control" placeholder="Enter your name" th:field="*{name}" /&gt;
  &lt;/div&gt;
  &lt;button type="submit" class="btn btn-default"&gt;Send&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And this is the generated HTML:</p>
  
  <pre><code>&lt;form action="/test" method="post"&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="control-label" for="name1"&gt;Name&lt;/label&gt;
      &lt;input type="text" class="form-control" placeholder="Enter your name" id="name" name="name" value=""&gt;
    &lt;/div&gt;
    &lt;button type="submit" class="btn btn-default"&gt;Send&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The <code>for</code> attribute should be correct according to the Thymeleaf guide, but the id of the textfield should have a number appended. Why is this number not appended?</p>