{"action":"opened","issue":{"url":"https://api.github.com/repos/oTree-org/otree-docs/issues/13","labels_url":"https://api.github.com/repos/oTree-org/otree-docs/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/oTree-org/otree-docs/issues/13/comments","events_url":"https://api.github.com/repos/oTree-org/otree-docs/issues/13/events","html_url":"https://github.com/oTree-org/otree-docs/issues/13","id":106846277,"number":13,"title":"formfield and loop example with label depending on forloop.counter","user":{"login":"vanderlindenma","id":2767157,"avatar_url":"https://avatars.githubusercontent.com/u/2767157?v=3","gravatar_id":"","url":"https://api.github.com/users/vanderlindenma","html_url":"https://github.com/vanderlindenma","followers_url":"https://api.github.com/users/vanderlindenma/followers","following_url":"https://api.github.com/users/vanderlindenma/following{/other_user}","gists_url":"https://api.github.com/users/vanderlindenma/gists{/gist_id}","starred_url":"https://api.github.com/users/vanderlindenma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanderlindenma/subscriptions","organizations_url":"https://api.github.com/users/vanderlindenma/orgs","repos_url":"https://api.github.com/users/vanderlindenma/repos","events_url":"https://api.github.com/users/vanderlindenma/events{/privacy}","received_events_url":"https://api.github.com/users/vanderlindenma/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-16T19:32:44Z","updated_at":"2015-09-16T19:32:44Z","closed_at":null,"body":"This is somewhat of a follow up question of https://github.com/oTree-org/otree-docs/issues/2.\r\n\r\nThe answer to https://github.com/oTree-org/otree-docs/issues/2 is very helpful and would definitely be worth adding to the doc.\r\n\r\nAlong the same lines, it would be nice if the doc explained how to have the forms' labels depend on the forloop.counter. I have tried using what I thought was a standard construct in Django template, namely\r\n\r\n`{% for field in form %}\r\n\r\n{% formfield field with label=\"blablabla {{ forloop.counter }}\" %}\r\n\r\n{% endfor %}`\r\n\r\nbut got {{forloop.counter}}  appears as is in the label, instead of it being replaced by its value.\r\n\r\nAlso posted a question at http://stackoverflow.com/questions/32615979/parsing-forloop-counter-in-forms-label-in-django and tried the suggestion there got an error:\r\n\r\nCould not parse the remainder: 's\" }}?\"' from '\"blablabla {{ forloop.counter|stringformat:\"s\" }}?\"' (Request Method: GET, Exception Type: TemplateSyntaxError, Django Version: 1.8.4)\r\n\r\nWeirdly enough, the person who answered on Stackoverflow was not able to reproduce the error on his machine.\r\n\r\n"}}