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.

Disallowed Key Characters on checkbox form

October 02, 2010 6:46am

Subscribe [2]
  • #1 / Oct 02, 2010 6:46am

    RevaCo

    240 posts

    Hello,

    Running 2.1.0
    Build: 20100810

    I have a form which submits to a channel.

    All going well except for checkbox array which is failing on submission.

    This is fine:

    <input name="reg_q5[Ford]" type="checkbox" value="Ford"  checked="checked" />


    This fails with ‘Disallowed Key Characters’

    <input name="reg_q5[Aston Martin]" type="checkbox" value="Aston Martin"  />


    What’s failing is the space in the reg_q5 array name.
    I’ve edited Line 538 of system/codeigniter/system/core/Input.php
    from:

    exit('Disallowed Key Characters.');

    To:

    exit("Disallowed Key Characters: $str");

    The above indeed shows me that spaces are the issue.

    I cannot hard code the array name as it’s genereated in a loop and I’m loathed to start making permanent edits to the core.

    Any suggestions?

    John

  • #2 / Oct 02, 2010 1:43pm

    RevaCo

    240 posts

    I’ve been reliably informed that I can leave my array value as blank and this mitigates EE throwing an error. (Well, it’s not an error, it’s EE doing its job)

    Please mark as closed.

  • #3 / Oct 02, 2010 3:42pm

    Ingmar

    29245 posts

    Thanks for letting us know. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases