beautypg.com

Button object options, Check box object options – Adobe Dreamweaver CC 2015 User Manual

Page 630

background image

623

Dynamic sites, pages and web forms

Last updated 6/3/2015

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.

Disabled

Disables the text area.

Read-only

Makes the text area a read-only text area.

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.

Init val

Assigns the value displayed in the field when the form first loads. For example, you might indicate that the user

enters information in the field by including a note or example value.

Class

Lets you apply CSS rules to the object.

Button object options

Button Name

Assigns a name to the button. Two reserved names, Submit and Reset, tell the form to submit the form

data to the processing application or script, or to reset all the form fields to their original values, respectively.

Value

Determines the text that appears on the button.

Action

Determines what happens when the button is clicked.

Submit Form

Submits the form data for processing when the user clicks the button. The data is submitted to the page

or script specified in the form’s Action property.

Reset Form

Clears the contents of the form when the button is clicked.

None

Specifies the action to be performed when the button is clicked. For example, you can add a JavaScript behavior

that opens another page when the user clicks the button.

Class

Applies CSS rules to the object.

Check Box object options

Checked Value

Sets the value to be sent to the server when the check box is checked. For example, in a survey you might

set a value of 4 for strongly agree and a value of 1 for strongly disagree.

Initial State

Determines whether the check box is selected when the form loads in the browser.

Dynamic

Lets the server dynamically determine the initial state of the check box. For example, you can use check boxes

to visually present the Yes/No information stored in a database record. At design time, you don’t know that information.
At run time the server reads the database record and selects the check box if the value is Yes.