Project:jQuery plugins
Version:6.x-1.6
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hey - this is great. Just what I needed. I have a form I have wriiten via FAPI in a module. This validates it great.
Just one question/problem.
How do I write the rule for checkboxes when drupal putputs the name as
test[one]
test[two]

rather than just test[]

I want to validate the checkboxes such that at least one in
the group must be checked.

thanks

K

Comments

#1

Have you tried the :unchecked selector?

    function countUnchecked() {
      var n = $("input:unchecked").length;
      $("div").text(n + (n == 1 ? " is" : " are") + " unchecked!");
    }
    countUnchecked();
    $(":checkbox").click(countUnchecked);

if you want all the elements with test in their name try the attributeContains selector.

    $('input[name*="test"]').css('border', '2px solid red');

#2

Status:active» fixed

Killing active issues

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here