Hey folks,
I often pass variables to the backend using associative arrays.
However, I can't seem to associate the error label with the group as a
whole, as in HTML Form terms, it's actually 2 separate elements,
rather than array (which PHP sees it as).

<label for="group[*wildcard*]">Associative Array Test</label>
<fieldset id="login">
        <label><input type="checkbox" name="group[property_1]" value="1"
validation="required:true/> Username</label>
        <label><input type="checkbox" name="group[property_2]" value="2"
validation="required:true/> Password</label>
</fieldset>
<label for="group[*wildcard*]" class="error">At least one option is
required</label>

What happens is, the automatic error messaging adds 2 brand new error
messages to each of the elements.

Is there currently a way for the plugin to recognise that the 2 items
ARE in fact an array? Can I use some kind of wildcard or selector in
the "for" attribute of the error label?

For reference, PHP will see the values like this:

Array
(
    [group] => Array
        (
            [property_1] => 1
            [property_2] => 2
        )

)

I can upload a live version if necessary.

Cheers,
Dave

Reply via email to