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} and {selected} used with <input> checkboxes

May 17, 2011 1:54am

Subscribe [4]
  • #1 / May 17, 2011 1:54am

    With regards to the use of the {categories} loop with <input type=“checkbox /> rather than <option>, does the {selected} tag still work as expected?

    <pre><code>{categories}
      <input class=“checkbox required” type=“checkbox” value=”{category_id}” name=“category[]” id=“specialty-{category_id}” {selected}>
      <label class=“checkbox” for=“specialty-{category_id}”>{category_name}</label><br>
    {/categories}</code></pre>

    Thanks
    Brendan

  • #2 / May 17, 2011 10:00am

    Rob Sanchez

    335 posts

    You can use {checked} instead of {selected}.

  • #3 / May 17, 2011 11:34am

    Sue Crocker

    26054 posts

    Thanks for the assist, Rob!

    Pro Film Crew of WA - is that enough information to get you started?

  • #4 / May 17, 2011 10:55pm

    Yes thanks.

    Cheers
    Brendan
    (ipixel)

  • #5 / May 17, 2011 11:11pm

    Rob Sanchez

    335 posts

    Had I known it was you I would not have helped. 😊

  • #6 / May 18, 2011 10:10am

    Sue Crocker

    26054 posts

    😊

    Brenden - If anything else comes up, please do let us know in a new thread..

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

ExpressionEngine News!

#eecms, #events, #releases