AS/400 Toolbox for Java \ HTML classes \ HTML forms \ Form input \ Checkbox forminput

CheckboxFormInput class

Start changeThe CheckboxFormInput class represents a checkbox input type in an HTML form. The user may select more than one of the choices presented as checkboxes within a form.

The following example shows you how to create a new CheckboxFormInput object:

    CheckboxFormInput checkbox = new CheckboxFormInput("uscitizen", "yes", "textLabel", true);
    System.out.println(checkbox.getTag());

The code above produces the following output:

<input type="checkbox" name="uscitizen" value="yes" checked="checked" /> textLabel

When you use this tag in an HTML form, it looks like this:

textLabel
End change
[ Information Center Home Page | Feedback ] [ Legal | AS/400 Glossary ]