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 Checkboxes

November 13, 2012 9:38am

Subscribe [1]
  • #1 / Nov 13, 2012 9:38am

    webnology

    353 posts

    Hi,

    I’m trying to fill checkboxes from a SC form.

    <input type="checkbox" name="nb_kopen" value="y" {nb_kopen}>

    The roor I get is:

    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Invalid argument supplied for foreach()
    
    Filename: checkboxes/ft.checkboxes.php
    
    Line Number: 82
    A PHP Error was encountered
    
    Severity: Warning
    
    Message: Cannot modify header information - headers already sent by (output started at /public_html/system/codeigniter/system/core/Exceptions.php:170)
    
    Filename: libraries/Functions.php
    
    Line Number: 402

    Can someone help me for this one, please?

    All help appreciated,
    Michel

  • #2 / Nov 15, 2012 11:17am

    Dan Decker

    7338 posts

    Hi Michael,

    Can you tell me what version of ExpressionEngine you are using?

    Try this bit of alternative code:

    {options:nb_kopen}
        <input type="checkbox" name="{option_name}" value="{option_value}"{checked}>
    {/options:nb_kopen}

    Also, make sure you have the preserve_checkboxes= parameter set.

    Cheers,

  • #3 / Nov 15, 2012 12:18pm

    webnology

    353 posts

    Hi Dan,

    I’m using 2.5.2.

    With the new code, I do’t even get the checkox to display :-|

    All help appreciated,
    Michel

  • #4 / Nov 16, 2012 4:16pm

    Dan Decker

    7338 posts

    Hi Michel,

    Can I come in for a look up close? Be on the lookout for an email from EllisLab!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases