Dreamweaver - Forms - Adding a text field
Go to the forms tab on the Insert menu:

Click on the icon to create a new form. In Design view, the form is outlined by a dashed red line.
Once you've created a form, move your cursor inside the form area. Then click on the icon to create a new text field. Text fields are used to read in data that the user types in:
Here's the code for that example:
If you want to change the properties of the text field, right click on it and select what you want to edit.
Selecting "Name..." pops up a window that allows you to change the name of the text field.
Selecting "Value..." pops up a window that allows you to change what the default text in the text field will be. Normally this is blank.
Selecting "Edit Tag <input>..." allows you to change all of the attributes at once:
- The "Type" dropdown menu lets you change it from a text field to a radio button or any other kind of form element. Selecting password from the menu will make it so that any text entered in the field will not be shown. Instead, dots will show up.
- The "Name" and "Value" fields let you change the name and default text.
- The "Size" field lets you specify how many characters wide the field is.
- The "Max Length" field lets you specify how many characters the field can hold.
- If the "Read Only" check box is checked, the viewer will not be able to type any text in the field.
- If the "Disabled" check box is checked, the viewer will not be able to type the text field.
Select "Edit Tag Code <input>..." if you want to edit the tag properties by hand.
Alternatively, you can change the properties of the text field through the properties menu:
- The box under the word "TextField" on the left is the name of the text field.
- The "Char Width" is how wide the text field is going to be.
- The "Max Chars" is the maximum number of characters that can be typed in.
- The "Type" radio buttons allow you to change the text field into a text area (by choosing "Multi line") or a password field (by choosing "Password"). Password fields are only different from text fields in that the text the user types in shows up as asterisks or dots instead of actual characters.
- The "Init Val" is the text that will appear in the field when the pag is loaded.
|
|