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.

safecracker- categories show="not 2" ?

January 20, 2012 12:08pm

Subscribe [2]
  • #1 / Jan 20, 2012 12:08pm

    meredithmarsh

    44 posts

    I’m trying to show the categories multiple select box using safecracker in and edit form. There are 3 parent categories, and I want to be able to show only the one parent and it’s children in the box. Seems like before safecracker, I was able to use the show=“not 2|3” parameter… ?

    Additionally, I have tried this, which works like I described, however it doesn’t show the categories you have already selected (which, to be a SC edit form, it needs to):

    <select name="category[]" size="12" multiple="multiple">
      {exp:channel:categories channel="member_listing" style="linear" category_group="2" show="not 11|14"}
      <option value="{category_id}">{category_name}</option>
       {/exp:channel:categories}
      </select>

    This (below), works fine and shows the categories previously saved with the entry, but for the life of my I can’t get it to display only the categories that aren’t 11 and 14.

    {category_menu}
      <select name="category[]" id="categories" size="12" multiple="multiple">
      {select_options}
      </select> 
      {/category_menu}
  • #2 / Mar 06, 2012 9:37pm

    Tyas

    35 posts

    Hi meredithmarsh,

    Have you find solution for this situation? i have the same problem.

    regards,
    tyas

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

ExpressionEngine News!

#eecms, #events, #releases