djangosnippets.org: Latest snippets tagged with 'radio'https://djangosnippets.org/tags/radio/2012-07-10T08:07:28.931687-05:00Radio widget with labels after inputs
2012-07-10T08:07:28.931687-05:00avsdhttps://djangosnippets.org/snippets/2785/<p>Difference from standard Django 1.4 implementation is just structure of list. In django <code><input></code> elements are <em>wrapped</em> by their labels, and look like this::</p>
<pre><code><ul>
<li><label><input/> Label 1</label>
<li><label><input/> Label 2</label>
</ul>
</code></pre>
<p>This widget puts labels <em>after</em> input elements::</p>
<pre><code><ul class="form-button-radio">
<li><input/> <label>Label 1</label>
<li><input/> <label>Label 2</label>
</ul>
</code></pre>
<p>It makes …</p>
Freely redistributableHorizontal RadioSelect widget
2012-02-27T11:22:12.285855-06:00gnrfanhttps://djangosnippets.org/snippets/2696/<p>The problem with Django's default Radio button widget is that it puts the buttons in a vertical format and the documentation is somewhat silent on how to make them horizontal. If you are dealing with a long list of buttons then veritical is probably the way to go but if …</p>
Freely redistributable