Setting text field properties

Setting text field properties

Use this Property inspector to set the properties of a text field.

To set text field properties:

  1. In the Text Field text box, assign a name to the text field.

    Every text field must have a unique name. The name you choose must uniquely identify the text field within the form. Form object names cannot contain spaces or special characters. You can use any combination of alphanumeric characters and an underscore (_). Note that the label you assign to the text field is the variable name that will store the value (the entered data) of the field. This is the value sent to the server for processing.

  2. Set any of the following options in the Property inspector:

    Char Width sets the maximum number of characters that can be displayed in the field. This number can be less than Max Chars, which specifies the maximum number of characters that can be entered in the field. For example, if the Char Width is set to 20 (the default value) and a user enters 100 characters, only 20 of those characters will be viewable in the text field. Note that even though you cannot view the characters in the field, they are recognized by the field object and will be sent to the server for processing.

    Max Chars sets the maximum number of characters that can be entered in the field for single-line text fields. Use Max Chars to limit zip codes to 5 digits, limit passwords to 10 characters, and so on. If you leave the Max Chars text box blank, users can enter any amount of text. If the text exceeds the character width of the field the text will scroll. If a user exceeds the maximum number of characters, the form produces an alert sound.

    Num Lines (available when the Multiline option is selected) sets the height of the field for multiple-line text fields.

    Wrap (available when the Multiline option is selected) specifies how the user’s input will be displayed when the user enters more information than can be displayed within the defined text area. The wrap options are as follows:

    • Selecting Off or Default prevents text from wrapping to the next line. When the user’s input exceeds the right boundary of the text area, text will scroll toward the left. Users must press Return to move the insertion point to the next line in the text area.
    • Selecting Virtual sets word wrap in the text area. When the user’s input exceeds the right boundary of the text area, text wraps to the next line. When data is submitted for processing, word wrap isn’t applied to the data. It is submitted as one string of data.
    • Selecting Physical sets word wrap in the text area, as well as to the data when it is submitted for processing.

    Type designates the field as a single-line, multiple-line, or password field.

    • Selecting Single-line results in an input tag with its type attribute set to text. The Char Width setting maps to the size attribute, and the Max Chars setting maps to the maxlength attribute.
    • Selecting Password results in an input tag with its type attribute set to password. The Char Width and Max Chars settings map to the same attributes as in single-line text fields. When a user types in a password text field, the input appears as bullets or asterisks to protect it from observation by others.
    • Selecting Multi-line results in a textarea tag. The Char Width setting maps to the cols attribute, and the Num Lines setting maps to the rows attribute.

    Init Value assigns the value displayed in the field when the form first loads. For example, you might indicate that the user enter information in the field by including a note or example value.

    Class lets you apply CSS rules to the object.

Related topics

  • Inserting HTML text fields
  • Form objects
  • Dynamic form objects


Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly
 
ASPTreeView.com
 
Evaluation has ИВ»»expired.
Info...