in reply to Re^2: How to uncheck one checkbox if some other is checked
in thread How to uncheck one checkbox if some other is checked

Hej Anonimous monk and thanks for your reply,

That's an excellent idea to check it on submission. The thing is that if neither of "P", "F" or "K" is checked then "Ej" should be checked and vice versa - if any(or more) of "P", "F" or "K" are checked then "Ej" must not be checked.

Anyhow, thanks for pointing to that direction

  • Comment on Re^3: How to uncheck one checkbox if some other is checked

Replies are listed 'Best First'.
Re^4: How to uncheck one checkbox if some other is checked
by Anonymous Monk on Aug 10, 2012 at 06:46 UTC

    That would be something like this, then.

    my %checked = map { $_ => 1 } $qry->param("GRU$Za"); if (keys %checked > 1) { delete $checked{'E'}; } elsif (keys %checked == 0) { %checked = ('E' => 1); }

    I'd still document it in the UI; it sounds like behaviour that is likely to cause confusion.