0

I have 2 categorys assigned to a channel that I want to use with channel form, however I only want to allow the editor to use 1 of these categories when adding a new element via channel form, I've tried the following:

{exp:channel:form channel="work" return="work/thanks"}
     <label for="categories">Categories</label>
     <select name="category[]" id="categories" size="4" multiple="multiple">
        {categories category_group="2"}
           <option value="{category_id}"{selected}>{category_name}</option>
        {/categories}
     </select>
{/exp:channel:form}

But this still outputs both categories, I can't seem to find any parameters in the documentation? http://ellislab.com/expressionengine/user-guide/modules/channel/channel_form/#category-group

0

Turns out it should have been show_group instead of category_group

{categories show_group="2"}
<option value="{category_id}"{selected}>{category_name}</option>
{/categories}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.