Share this Page URL
Help

Lesson 11. Creating Forms > Adding Multi-Line Text Fields - Pg. 298

Creating Forms TIP 298 7. Be careful when setting the Max Char for fields that accept information such as email addresses and URLs. Users won't be able to enter a complete URL or any other infor- mation if that information is longer than the Max Char value, because they won't be able to type past the limit you set. With the email field still selected, type Enter your email in the Init Val text field on the Property inspector. The initial value defines any text that appears in the text field when the visitor loads the page. Visitors can replace the initial value text with text of their own. Initial values are useful for prompting users to enter information or displaying example text. However, initial values may be a disadvantage if a visitor skips over the field because it looks like it has already been filled out. 8. Save the file and preview it in the browser. Leave this file open for the next exercise. NOTE A regular text field displays the information in the browser as you type it in. A password text field looks the same as any other text field, but the text displayed on the screen is hidden by bullets or asterisks as you type. The password option only hides the text in the field from someone looking over your shoulder as you type--it does not encrypt or secure your data. To encrypt data, you must have secure server software running on the Web server. You should talk to your Web administrator for detailed information on securing data. To create a password field, insert a standard single-line text field and select Password for the Type option on the Property inspector. This option causes asterisks or bullets to appear when a user enters data in this field. Password text fields can be only single-line text fields. The Max Chars value for passwords should be set at the limit for passwords on your server. Adding Multi-Line Text Fields Multi-line text fields make it easier to collect larger amounts of information from a user by providing a text area with multiple lines in which the visitor can type. Typical multi-line text fields collect com- ments and feedback from visitors. In this exercise, you will place a multi-line text field in the table inside the form. 1. In the lights_quiz.html document, type Describe how a Fresnel lens works: in the left cell of row 4 and press Tab twice. The multi-line text field will be inserted in same column as the single-line text fields from the previous exercise. Click the Text area icon on the Forms tab of the Insert bar. TIP 2. You can also insert a multi-line text field by choosing Insert > Form Objects > Textarea. A multi-line text field is placed in the form and the Property inspector shows Text Field prop- erties.