Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dreamweaver CS3 Concepts and Techniques Chapter 4 Forms.

Similar presentations


Presentation on theme: "Dreamweaver CS3 Concepts and Techniques Chapter 4 Forms."— Presentation transcript:

1 Dreamweaver CS3 Concepts and Techniques Chapter 4 Forms

2 Chapter 4: Forms 2 Chapter Objectives Discuss form processing Describe the difference between client-side and server-side form processing Add a horizontal rule to a Web page Create a form Discuss form design

3 Chapter 4: Forms 3 Chapter Objectives Insert a table into a form Describe form objects Describe and add text fields and text areas to a form Describe and add check boxes and radio buttons to a form Describe and add lists and menus to a form

4 Chapter 4: Forms 4 Chapter Objectives Describe and add form buttons to a form Describe form accessibility options Apply behaviors to a form View and test a form

5 Chapter 4: Forms 5 Form Processing Server-side scripts Common Gateway Interface (CGI) tag –GET method –POST method Form components – tag

6 Chapter 4: Forms 6 Copying Data Files to the Parks Web Site Click the Start button on the Windows taskbar and then click My Computer Double-click Local Disk (C:) and then navigate to the location of the data files for Chapter 4 Double-click the DataFiles folder, double-click the Chap04 folder, and then double-click the parks folder Hold down the SHIFT key and select the two data files. Right-click and click the Copy command Navigate back to the your name folder. Paste the two data files into the parks folder. Close the parks folder

7 Chapter 4: Forms 7 Copying Data Files to the Parks Web Site

8 Chapter 4: Forms 8 Starting Dreamweaver and Opening the Colorado Parks Web Site Click the Start button on the Windows taskbar Point to All Programs on the Start menu, point to Adobe on the All Programs submenu, and then click Adobe Dreamweaver CS3 on the Adobe submenu If necessary, display the panel groups Click the Files panel box arrow and then click Colorado Parks on the Files pop-up menu

9 Chapter 4: Forms 9 Starting Dreamweaver and Opening the Florida Parks Web Site

10 Chapter 4: Forms 10 Inserting and Formatting the Heading Double-click hotel_form.htm in the Files panel Click the Document window, type Colorado National Parks as the first line of the heading and then press SHIFT+ENTER to insert a line break. Type Hotel Reservations Form as the second heading line Drag to select both lines of text, apply Heading 1, and then click the Align Center button in the Property inspector. Deselect the text and then press the ENTER key

11 Chapter 4: Forms 11 Inserting and Formatting the Heading Double-click hotel_form.htm in the Files panel Click the Document window, type Colorado National Parks as the first line of the heading and then press SHIFT+ENTER to insert a line break. Type Hotel Reservations Form as the second heading line. Drag to select both lines of text, apply Heading 1, and then click the Align Center button in the Property inspector. Apply text color # to the heading. Deselect the text and then press the ENTER key. Click View on the menu bar, point to Visual Aids, and if necessary, deselect the CSS Layout Outlines and AP Element Outlines commands. Click the Save button on the Standard toolbar. Hide the panel groups and collapse the Property inspector, if necessary.

12 Chapter 4: Forms 12 Inserting and Formatting the Heading

13 Chapter 4: Forms 13 Inserting a Horizontal Rule Click Insert on the menu bar, point to HTML, and then point to Horizontal Rule Click Horizontal Rule Click the Horizontal rule text box and type horz_rule Click the W (Width) text box and type 500. Press the TAB key two times

14 Chapter 4: Forms 14 Inserting a Horizontal Rule Type 10 in the H (Height) text box Click the Shading check box to deselect it Click at the end of the line and press the ENTER key. If necessary, click the Align Left button Click the Save button

15 Chapter 4: Forms 15 Inserting a Horizontal Rule

16 Chapter 4: Forms 16 Inserting a Form If necessary, display the Insert bar. Click the arrow to the right of the display category on the Insert bar and then point to Forms on the Insert bar pop-up menu Click Forms and then click the Form button

17 Chapter 4: Forms 17 Setting the Form Properties Double-click the Form Name text box in the Property Inspector. Type hotel_form and then press the TAB key Type (use your own address) Click the Target box arrow, select _self, and then press the TAB key Type text/plain and then press the ENTER key

18 Chapter 4: Forms 18 Setting the Form Properties

19 Chapter 4: Forms 19 Inserting a Table into a Form Click inside the form (the dotted red outline) Click Insert on the menu bar and then point to Table Click Table

20 Chapter 4: Forms 20 Inserting a Table into a Form Type the following values in the table: Rows – 11, Columns – 2, Table Width – 75 percent, Border thickness – 4, Cell padding – 5, Cell spacing – 0, and Hotel reservation form for Colorado’s four national parks as the Summary text Click the OK button Verify that the table is selected, click the Align box arrow in the Property inspector and then select Center

21 Chapter 4: Forms 21 Inserting a Table into a Form

22 Chapter 4: Forms 22 Formatting the Form Click the Table Id box, type reservations and then press the ENTER key Expand the Property inspector If necessary, scroll up, click row 1, column 1, and then drag to select all of column 1. Click the W text box, type 35% and then press the ENTER key

23 Chapter 4: Forms 23 Formatting the Form Click the Align Right button in the Property inspector Click the tag in the tag selector. Click the Brdr Color hexadecimal text box. Type # and then press the ENTER key Click the Save button on the Standard toolbar

24 Chapter 4: Forms 24 Formatting the Form

25 Chapter 4: Forms 25 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form If necessary, scroll up and then click row 1, column 1 Type Name as the descriptive label and then press the TAB key Click the Text Field button Double-click the TextField text box in the Property inspector, type name and then press the TAB key Type 50 in the Char Width text box and then press the TAB key. If necessary, click Single line

26 Chapter 4: Forms 26 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form Click row 2, column 1, type Address, and then press the TAB key Click the Text Field button on the Forms category If necessary, scroll down. Double-click the TextField text box in the Property inspector, type address, and then press the TAB key Type 50 in the Char Width text box and then press the TAB key. If necessary, click Single line Click row 3, column 1, and then type City. Press the TAB key

27 Chapter 4: Forms 27 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form Click the Text Field button on the Forms category Type city as the TextField name Type 50 in the Char Width text box and then press the TAB key. Ensure Single line is selected Click row 4, column 1. Type State/Zip Code as the label and then press the TAB key

28 Chapter 4: Forms 28 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form Type State and then press the SPACEBAR Click the Text Field button. Type state for the TextField name in the Property inspector Type 2 for the Char Width and Max Chars values. Ensure Single line is selected Click to the right of the State form object and then press the SPACEBAR. Type Zip Code and then press the SPACEBAR

29 Chapter 4: Forms 29 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form Click the Text Field button Type zip as the TextField name Type 10 for the Char Width and Max Chars values and then press the TAB key. Ensure Single line is selected If necessary, scroll down. Click row 5, column 1, and then type address

30 Chapter 4: Forms 30 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form Press the TAB key and then click the Text Field button Type as the TextField name Type 45 for the Char Width value and then press the ENTER key. Ensure Single line is selected Press CTRL+S to save the page

31 Chapter 4: Forms 31 Adding Descriptive Labels and Single-Line Text Fields to the Hotel Reservations Form

32 Chapter 4: Forms 32 Adding Check Boxes Click row 6, column 1, type Hotels, and then press the TAB key Click the Checkbox button on the Forms category Type hotel1 as the CheckBox name Press the TAB key and then type black_canyon in the Checked value text box. Press the ENTER key Click to the right of the check box form object and then press SHIFT+ENTER to add a line break

33 Chapter 4: Forms 33 Adding Check Boxes Click the Checkbox button Type hotel2 as the CheckBox name. Press the TAB key and then type mesa_verde in the Checked value text box. Press the ENTER key Click to the right of the second check box, press SHIFT+ENTER to add a line break, and then click the Checkbox button on the Forms category Type hotel3 as the CheckBox name Press the TAB key and then type rocky_mountains in the Checked value text box. Press the ENTER key

34 Chapter 4: Forms 34 Adding Check Boxes Click to the right of the third check box, press SHIFT+ENTER to add a line break, and then click the Checkbox button on the Forms category Type hotel4 as the Checkbox name Press the TAB key and then type sand_dunes in the Checked value text box. Press the ENTER key

35 Chapter 4: Forms 35 Adding Check Boxes Click to the right of the first check box Type Black Canyon Royale and then press the DOWN ARROW key Type Mesa Verde Pueblo as the descriptive label for the second check box, press the DOWN ARROW key, and then type Rocky Mountains Station as the label for the third check box Press the DOWN ARROW key, and then type Sand Dunes Central as the label for the fourth check box Click the Save button on the Standard toolbar

36 Chapter 4: Forms 36 Adding Check Boxes

37 Chapter 4: Forms 37 Creating a Scrolling List Click row 7, column 1.Type Accommodations and then press the TAB key. Click the List/Menu button on the Forms tab Type accommodations as the List/Menu name. Click List in the Type options Type 2 in the Height box Click the Selections check box to allow multiple selections

38 Chapter 4: Forms 38 Creating a Scrolling List Click the List Values button Type Single as the first Item Label, press the TAB key, and then type single as the Value. Press the TAB key Type Double as the second Item Label Type double as the Value and then press the TAB key Type Suite as the third Item Label

39 Chapter 4: Forms 39 Creating a Scrolling List Type suite as the Value and then press the TAB key Type Luxury Suite as the fourth Item Label. Type luxury_suite as the Value Click the OK button Click Single in the Initially selected box in the Property inspector Click the Save button on the Standard Toolbar

40 Chapter 4: Forms 40 Creating a Scrolling List

41 Chapter 4: Forms 41 Creating a Pop-Up Menu If necessary, scroll down and then click row 8, column 1 Type Number of nights and then press the TAB key Click the List/Menu button on the Forms tab Type nights in the List/Menu text box to name the pop-up menu Click the List Values button. In the List Values dialog box, type 1 as the Item Label, press the TAB key, and then type 1 for the Value

42 Chapter 4: Forms 42 Creating a Pop-Up Menu Press the TAB key. Repeat Step 3, incrementing the number each time by 1 in the Item Label and Value fields, until the number 7 is added to the Item Label field and the Value field Click the OK button Click the number 1 in the Initially selected box in the Property inspector

43 Chapter 4: Forms 43 Creating a Pop-Up Menu

44 Chapter 4: Forms 44 Inserting a Jump Menu Click row 9, column 1, type Links, and then press the TAB key Click the Jump Menu button Type Choose one in the Text text box and then click the Plus (+) button Double-click the Text text box Type Black Canyon of the Gunnison National Park as the text for the second menu item and then press the TAB key

45 Chapter 4: Forms 45 Inserting a Jump Menu Type and then point to the Plus button Click the Plus button, double-click the Text text box, type Great Sand Dunes National Park as the entry, and then press the TAB key Type and then point to the Plus button Click the Plus button, double-click the Text text box, type Mesa Verde National Park as the entry, and then press the TAB key

46 Chapter 4: Forms 46 Inserting a Jump Menu Type and then click the Plus button Double-click the Text text box, type Rocky Mountain National Park as the entry, and then press the TAB key Type for the link Double-click in the Menu ID text box and type park_web_sites Click the Select first item after URL change check box

47 Chapter 4: Forms 47 Inserting a Jump Menu Click the OK button Click Choose one in the Initially selected box in the Property inspector Click the Save button on the Standard toolbar

48 Chapter 4: Forms 48 Inserting a Jump Menu

49 Chapter 4: Forms 49 Adding a TextArea Text Field If necessary, scroll down. Click row 10, column 1 Type Comments and then press the TAB key Click the Textarea button on the Forms tab Type comments as the name for the TextField Press the TAB key and type 50 for the Char width value. Press the TAB key and type 4 for the Num lines value

50 Chapter 4: Forms 50 Adding a TextArea Text Field Click the Init val box, type Please add your comments as the entry Verify that Multi line is selected Click the textarea in the form to display the initial value Click the Save button on the Standard toolbar

51 Chapter 4: Forms 51 Adding a TextArea Text Field

52 Chapter 4: Forms 52 Adding the Submit and Reset Buttons If necessary, scroll down and then click row 11, column 1 (Figure 4-71) Click the Button button on the Forms tab. If the Input Tag Accessibility Attributes dialog box is displayed, click the Cancel button Click row 11, column 2, and then click the Button button on the Forms tab

53 Chapter 4: Forms 53 Adding the Submit and Reset Buttons Type reset in the Button name text box and then press the TAB key Type Reset in the Value text box and then click Reset form in the Action area Click the Save button on the Standard toolbar

54 Chapter 4: Forms 54 Adding the Submit and Reset Buttons

55 Chapter 4: Forms 55 Opening the Volunteer.htm Web Page If necessary, click the expand/collapse arrow to display the panel groups Double-click volunteer.htm in the Files panel Click the expand/collapse arrow to hide the panel groups

56 Chapter 4: Forms 56 Adding a Form and Table to the Volunteer.htm Web Page If necessary, scroll down and then position the insertion point at the end of the last line of text. Press the ENTER key Click the Form button on the Forms tab In the Property inspector, type newsletter as the form name Uses the mailto: format and type your address in the Action text box Select _self on the Target pop-up menu, type text/plain in the Enctype box, and then press the ENTER key

57 Chapter 4: Forms 57 Adding a Form and Table to the Volunteer.htm Web Page Click inside the form in the Document window. Click Insert on the menu bar and then click the Table command Create a four-row, two-column table, with a width of 75%, a border thickness of 4, and a cell padding of 5. Type Colorado National Parks newsletter in the Summary text box. Click the OK button Scroll up and down as necessary Click the Table Id text box and type newsletter_form as the entry Click the Align button in the Property inspector, and then center the table Enter # in the Brdr color hexadecimal text box and then press the ENTER key

58 Chapter 4: Forms 58 Adding a Form and Table to the Volunteer.htm Web Page Select row 1 and then merge the cells Click row 1, type Colorado National Parks as the entry, and then press SHIFT+ENTER to insert a line break Type Newsletter Information and then select the two lines of text Apply Heading 2 and center the heading Select rows 2 through 4, column 1, and then click the Align Right button in the Property inspector Click the Save button on the Standard toolbar

59 Chapter 4: Forms 59 Adding a Form and Table to the Volunteer.htm Web Page

60 Chapter 4: Forms 60 Adding an Address and Inserting a Single-Line Text Box Select rows 2 through 4, column 1, and then set the column width to 35% Click row 2, column 1, type as the entry, and then press the TAB key Click the Text Field button on the Forms tab Double-click the TextField text box in the Property inspector. Type and then press the TAB key Type 30 and then press the TAB key

61 Chapter 4: Forms 61 Inserting a Single-Line Text Box

62 Chapter 4: Forms 62 Adding a Radio Group Click row 3, column1. Type I am interested in receiving a newsletter and then press the TAB key Point to the Radio Group button on the Forms tab Click the Radio Group button Type newsletter and then click the first instance of Radio in the Label field Type Daily as the Label and then press the TAB key

63 Chapter 4: Forms 63 Adding a Radio Group Type daily as the Value Press the TAB key, type Weekly in the Label field, and then press the TAB key Type weekly as the entry Click the Plus button, click Radio, and then type Monthly in the Label field. Press the TAB key Type monthly and then, if necessary, click the Lay out using Line breaks ( tags) radio button Click the OK button

64 Chapter 4: Forms 64 Adding a Radio Group

65 Chapter 4: Forms 65 Adding the Submit and Reset Buttons to the Volunteer.htm Form If necessary, scroll down. Click row 4, column 1, and then click the Button button on the Forms tab Click row 4, column 2, and then click the Button button on the Forms tab Type reset as the Button name and then press the TAB key Type Reset in the Value text box and then click Reset form in the Action area Click the Save button on the Standard toolbar

66 Chapter 4: Forms 66 Adding the Submit and Reset Buttons to the Volunteer.htm Form

67 Chapter 4: Forms 67 Adding Links to the Volunteer.htm, Hotel_Form.htm, and Natl_Parks.htm Web Pages Display the panel groups and open the natl_parks.htm Web page Scroll to the end of the Web page and then add a line break after the Home link. Press the END key Type Colorado National Parks Volunteer Association. Add a line break, and then type Colorado National Parks Hotel Reservations as the entry Select the text Colorado National Parks Volunteer Association and Parks Hotel Reservations and create a link to the hotel_form.htm Web page Save the create a link to the volunteer.htm Web page. Select the text Colorado National natl_parks.htm Web page and then press the F12 key to display the page in your browser. Verify that the links work and close the browser. Close the natl_parks.htm Web page

68 Chapter 4: Forms 68 Adding Links to the Volunteer.htm, Hotel_Form.htm, and Natl_Parks.htm Web Pages Click the volunteer.htm tab and then scroll to the bottom of the page. Type Home and then add a line break Type Colorado National Parks as the entry Select the Home text and then create a link to the index.htm Web page Select the Colorado National Parks text and then create a link to the natl_parks.htm Web page Save the volunteer.htm Web page

69 Chapter 4: Forms 69 Adding Links to the Volunteer.htm, Hotel_Form.htm, and Natl_Parks.htm Web Pages Press the F12 key to display the Web page in your browser and then verify that the links work. Close the browser Click the hotel_form.htm tab and then, if necessary, scroll to the bottom of the page. Type Home and then add a line break Type Colorado National Parks as the entry Select the Home text and then create a link to the index.htm Web page Select the Colorado National Parks text and then create a link to the natl_parks.htm Web page

70 Chapter 4: Forms 70 Adding Links to the Volunteer.htm, Hotel_Form.htm, and Natl_Parks.htm Web Pages Save the hotel_form.htm Web page Press the F12 key to display the Web page in your browser and then verify that the links. Close the browser

71 Adding Links to the Volunteer.htm, Hotel_Form.htm, and Natl_Parks.htm Web Pages Chapter 4: Forms 71

72 Chapter 4: Forms 72 Adding the Validate Form Behavior Display the panel groups and hide the Property inspector If necessary, click the hotel_form.htm tab Click Window on the menu bar and then point to Behaviors Click Behaviors If necessary, click anywhere inside the form. Click in the tag selector. Click the Add behavior button in the Behaviors panel and then point to Validate Form on the pop-up menu

73 Chapter 4: Forms 73 Adding the Validate Form Behavior Click Validate Form Click the Value Required check box Click the text input “address” and then click Value Required for the “address” field Repeat the above step for the city, state, and zip fields Click input “ ” (Ris ) in the Fields box. If necessary, click the Value Required check box, and then click the address radio button

74 Chapter 4: Forms 74 Adding the Validate Form Behavior Click the OK button Click anywhere in the Document window (except in the form) to deselect the form Click the Save button on the Standard toolbar

75 Chapter 4: Forms 75 Viewing and Testing the Forms Press the F12 key. If an information bar is displayed, click the bar to allow the content Complete the form, typing data in each field, and then click the Submit button Read the information in the dialog box, and then click the OK button Close the browser and return to Dreamweaver

76 Chapter 4: Forms 76 Adding Behaviors, Viewing, and Testing the Volunteer.htm Form Click the volunteer.htm tab. Click inside the form, but not in the table, and then click in the tag selector. Verify that form#newsletter is selected in the tag selector Click the Add behavior button on the Behaviors panel and then click Validate Form on the pop-up menu Click the Value Required check box and the address radio button and then click the OK button Save the form Press the F12 key to display the form in your browser

77 Chapter 4: Forms 77 Adding Behaviors, Viewing, and Testing the Volunteer.htm Form Click the address form object and then type your e- mail address Click the Weekly radio button and then click the Submit button Click the OK button in the Windows Internet Explorer dialog box to the data Close the browser and return to Dreamweaver If instructed to do so, upload your Web site to a remote server. Appendix C contains information on uploading to a remote server. A remote folder is required before you can upload to a remote server. Generally, the remote folder is defined by the Web server administrator or your instructor

78 Chapter 4: Forms 78 Adding Behaviors, Viewing, and Testing the Volunteer.htm Form

79 Chapter 4: Forms 79 Closing the Web Site and Quitting Dreamweaver Click the Close button on the upper-right corner of the Dreamweaver title bar

80 Chapter 4: Forms 80 Chapter Summary Discuss form processing Describe the difference between client-side and server-side form processing Add a horizontal rule to a Web page Create a form Discuss form design

81 Chapter 4: Forms 81 Chapter Summary Insert a table into a form Describe form objects Describe and add text fields and text areas to a form Describe and add check boxes and radio buttons to a form Describe and add lists and menus to a form

82 Chapter 4: Forms 82 Chapter Summary Describe and add form buttons to a form Describe form accessibility options Apply behaviors to a form View and test a form

83 Dreamweaver CS3 Concepts and Techniques Chapter 4 Complete Forms


Download ppt "Dreamweaver CS3 Concepts and Techniques Chapter 4 Forms."

Similar presentations


Ads by Google