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

TextFormInput class

Start changeThe TextFormInput class represents a single line text input type in an HTML form. The TextFormInput class provides methods that let you get and set the maximum number of characters a user can enter in the text field.

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

    TextFormInput text = new TextFormInput("userID");
    text.setSize(40);
    System.out.println(text.getTag());

The code example above generates the following tag:

<input type="text" name="userID" size="40" />

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

Name:
End change