INTERFACE

Attributes

The CGI::Test::Form::Group object which holds all the groups of the same widget type.

group_list

The list of widgets belonging to the same group as we do.

is_checked

True when the box is checked, i.e. marked with a tick.

Attribute Setting

check

Check the box, by ticking it.

check_taggedtag

This may be called on any box, and it will locate the box whose value attribute is tag within the group_list, and then check it.

If the specified tag is not found, the caller will get a warning via carp.

uncheck

Uncheck the box, by removing its ticking mark. It is not possible to do this on a radio button: you must check another radio button of the same group instead.

uncheck_taggedtag

This may be called on any box, and it will locate the box whose value attribute is tag within the group_list, and then remove its ticking mark. It is not possible to do this on a radio button, as explained in uncheck above.

If the specified tag is not found, the caller will get a warning via carp.

Widget Classification Predicates

There is an additional predicate to distinguish between a checkbox and a radio button:

is_radio

Returns true for a radio button.

is_standalone

Returns true if the box is the sole member of its group.

Normally only useful for checkboxes: a standalone radio button, although perfectly legal, would always remain in the checked state, and therefore not be especially interesting...

Miscellaneous Features

Although documented, those features are more targetted for internal use...

set_is_checkedflag

Change the checked status. Radio buttons can only be checked, i.e. the flag must be true: all other radio buttons in the same group are immediately unchecked.

You should use the check and uncheck convenience routines instead of calling this feature.