I want to output category groups as checkboxes, I've got them outputting correctly however when they are selected and the form is submitted they aren't actually being assigned to the chosen categories suggesting I haven't got them quite right.
here's the code:
{exp:channel:form channel="work" return="contribute/thanks"}
<p>
<label for="title">Title</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle();">
<input type="hidden" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50">
</p>
<h2>Formats</h2>
{categories show_group="4"} {!-- formats --}
<label class="checkbox">{category_name}
<input type="checkbox" id="{category_id}" name="{category_id}[]" value="{category_id}">
</label>
{/categories}
<p><input type="submit" name="submit" value="Submit"></p>
{/exp:channel:form}
Any ideas on what i'm doing wrong?