Welcome Guest, Not a member yet? Register   Sign In
form field name="key[]" causes "Disallowed Character Keys"
#1

[eluser]skunkbad[/eluser]
I've got a series of form fields that must be posted as an array, but CI doesn't seem to like the square brackets. I'd hate to hack the input class. What's the deal with this type of form field?

Code:
<td>&lt;input type="text" name="whatever[]" value="" /&gt;&lt;/td>

It's just standard HTML.
#2

[eluser]skunkbad[/eluser]
OK, just being stupid. For anyone trying to track down the key that is giving the Disallowed Key Chars error, just temporarily edit your input class on line 215ish:

Code:
function _clean_input_keys($str)
    {
        if ( ! preg_match("/^[a-z0-9:_\/-]+$/i", $str))
        {
            echo $str;
            exit('Disallowed Key Characters.');
        }

        return $str;
    }

Then you actually get to SEE the error, which in my case was a dollar sign, and not the square brackets!




Theme © iAndrew 2016 - Forum software by © MyBB