ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Change category of parent entry using channel form

September 26, 2014 8:34am

Subscribe [1]
  • #1 / Sep 26, 2014 8:34am

    duser0

    1 posts

    Hi

    We’re trying to setup a form that allows a member to add or remove a category from parent category.

    There’s only one category available to the parent, and all we want to do is allow the user to enable or disable it by checking / unchecking a box.

    We have a form that allows them to edit the parent entry which works fine for the other fields, but we need to allow them to turn on and off the category.

    We have it setup as outlined below, but this doesn’t seem to be working?... :(

    Furthermore, in the future we’d like to be able to do this for multiple different categories and create more checkboxes, but not sure how to proceed?

    Thanks!

    {exp:channel:form
    channel="parent_channel"
    author_only="no"
    include_jquery="yes"
    datepicker="no"
    entry_id="{id}"
    return="parent_channel/edited"
    parse="inward"
    }
    
    {categories}
      <input type="checkbox" name="category[data][]" id="{category_name}" value="{category_id}">
      <label for="{category_name} {checked}">Enable Category</label>
    {/categories} 
    
    <input type="submit" value="Save Changes">
    
    {/exp:channel:form}
  • #2 / Sep 30, 2014 5:34am

    duser0

    1 posts

    Anyone got any ideas about this?

    Thanks

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases