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.

HELP Checkboxes in Channel Form 2.7 not updating Entries ?

September 10, 2013 8:07pm

Subscribe [1]
  • #1 / Sep 10, 2013 8:07pm

    adamprocter

    228 posts

    I updated to 2.7 and was using safecracker a lot, seems to be fine for most stuff but I am having issues editing entries checkboxes ?

    added at the top preserve_checkboxes=“yes” - just in case

    Was working but now does not update the entry ?

    {options:im_a_friend}
          <label class="checkbox">
           <input type="checkbox" id="im_a_friend" name="im_a_friend[]" value="{option_value}"{checked}>
         {option_value} </label><br>
        {/options:im_a_friend}

    Are checkboxes different now?

  • #2 / Sep 11, 2013 5:50am

    adamprocter

    228 posts

    Looks like you can just use

    {field:im_a_friend}

    As channel field is checkbox it writes the code for you.

    Although it does not seem to keep what as already checked in the channel entry
    even with preserve_checkboxes=“yes”

  • #3 / Sep 11, 2013 5:58am

    adamprocter

    228 posts

    ah ha

    {custom_fields}
       {if checkbox}
      {options}
                             <label class="checkbox">{option_value}
                                     <input type="checkbox" id="{field_name}" name="{field_name}[]" value="{option_value}"{checked}>
                             </label>
                     {/options}
                     {/if}
     {/custom_fields}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases