Checkbox display type return values

Hi,

I searched in vain for an answer to this: If in a field defined with displaytype check, you select multiple values, how are the values returned?

As an array ? I looked at it in the debugger, but there it looks like a string, which makes it hard to seperate the different selected values. So now I’m wondering how I parse the returned values?

Second question: where in the docs should I have found this ?

TIA

That was more-or-less the conclusion I reached some weeks ago: it looks like the values are returned in a string, white-space separated.

In my case I was loking for single-digit values, so was able to parse them into an array and processed them something like this:

fooString = globals.foo; // globals.foo holds the values
fooArray = fooString.match(/[0-9]/g);
if (fooArray.length > 0) {
    for ( var i = 0 ; i < fooArray.length ; i++ ) {
        // process value
    }
}

HTH,
Neale.