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: select one specific category group

March 17, 2011 2:04pm

Subscribe [2]
  • #1 / Mar 17, 2011 2:04pm

    Pv Ledoux

    95 posts

    Hi there,

    is there a way to select only one category group with SafeCracker?

    For instance:

    <label for="categories">Categories</label>
    
    <select name="category[]" id="categories" size="4" multiple="multiple">
        {categories group_id="2"}
            <option value="{category_id}"{selected}>{category_name}</option>
        {/categories}
    </select>

    by adding the group_id=“2” parameter to the category tag?


    Thanks!


    Cheers,

    Pv

  • #2 / Mar 18, 2011 9:43am

    Sue Crocker

    26054 posts

    Hi, Pv. I don’t know that you can via code. What happens when you try it?

  • #3 / Mar 18, 2011 9:57am

    Pv Ledoux

    95 posts

    Hi Sue,

    I must confess that I didn’t even tried! And… it works ! Wonderful!

    EE astonish me every day, I dream about a functionality, and it magically appears 😉

    Thanks 😉


    Pv

  • #4 / Mar 18, 2011 10:04am

    Sue Crocker

    26054 posts

    😊

    Sounds like this would make a great wiki article. Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases