djangosnippets.org: Latest snippets tagged with 'boundfield'https://djangosnippets.org/tags/boundfield/2007-03-05T07:44:38.226982-06:00Render dynamically assigned fields in a template
2007-03-05T07:44:38.226982-06:00rubichttps://djangosnippets.org/snippets/82/<p><strong>Problem:</strong> You want to render an arbitrary number of fields assigned dynamically, as in <a href="http://www.djangosnippets.org/snippets/27/">snippet #27</a>, but using multiple <code>if</code> statements in a template would be tedious.</p>
<p><strong>Solution:</strong> newforms BoundField</p>
<p>The example demonstrates a form with medication fields. We don't know in advance how many meds will be prescribed …</p>
Freely redistributable