DREAMWEAVER CS3
User Guide
606
3
Set the form Method to
POST
.
4
From the Enctype pop-up menu, select
multipart/form-data
.
5
In the Action box, specify the server-side script or page capable of handling the uploaded file.
6
Place the insertion point inside the form outline, and select Insert > Form > File Field.
7
Set any of the following options in the Property inspector:
File Field Name
Specifies the name for the file field object.
Char Width
Specifies the maximum number of characters that can be displayed in the field.
Max Chars
Specifies the maximum number of characters the field will hold. If the user browses to locate the file, the
filename and path can exceed the specified Max Chars value. However, if the user attempts to type in the filename
and path, the file field will only allow the number of characters specified by the Max Chars value.
HTML text field object properties
Select the text field object, and set any of the following options in the Property inspector:
Char Width
Specifies 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. Although you cannot view the characters in the field, they are recognized by the field object
and are sent to the server for processing.
Max Chars
Specifies the maximum number of characters that the user can enter 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
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:
•
O
ff or Default
Prevents text from wrapping to the next line. When the user’s input exceeds the right boundary of
the text area, text scrolls toward the left. Users must press Return to move the insertion point to the next line in the
text area.
•
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.
•
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.
•
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.
•
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.
•
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.
September 4, 2007