Creating Forms with Expression Web 3 - Part 3
Part 3 - Inserting Form Names and Values
This section will go over inserting the names and values for your form fields and buttons. These are the hidden names and values that will appear when you receive your form via email.
We are now going to save the file. Go to File > Save As. Save your form into your website folder as contactform.php
Note: You MUST save your file with the extension .php
Go to the first row, second column and double click the form field. A window will pop cup called Text Box Properties. In the Name field, type “name.”
Optionally, you can put “Type Your Name Here” in the Initial value field. This is the text that will appear in the box before the user puts in information.
In the Width in characters field, type in 25.
Make sure Password field is set to No.
Repeat step 2 for the Email form field in the second row, second column. This time use “email” for the Name field.
Double click the first radio button in the third row, second column. In the Group name field type in “User_Type.”
Note: There is an underscore in the “User_Type” to replace the space. Spaces cannot be used in form field names, so we used an underscore in its place.
Since this radio button is next to “Student” in the form, we are going to set its Value to “Student”.
Since it is the first radio button in the group, we will set its Initial state to Selected.
Go to the next radio button (next to “Faculty”) in the group and repeat step 4.
The Group name will remain “User_Type” since this radio button is apart of the same group. Its Value will be set to “Faculty.”
Its Initial value will be set to “Not selected.”
Do the same thing for the last radio button, but set its Value to “Staff.”
Go to the fourth row, second column. Double click the drop-down menu underneath “Undergrad.” A box called Drop-Down Box Properties will pop up.
In the Name field, type in “If_a_student.”
In the box with “Choice, Selected, Value” on top, double click in the white space in the same line as the “No.” A box called Modify Choice will pop up.
In the Choice field, type in “Undergrad”.
Check the Specify Value box.
We are now going to add a second option to the drop-down field for Grad. Click the Add button in the Drop-Down Box Properties box.
In the Choice field, type in “Grad”.
Check the Specify Value box.
We now have two choices in the If_a_student drop-down menu. In the Drop-Down Box Properties box, select OK.
You can now delete the text in fourth row, second column that says “Grad” and “Undergrad.” You should now just have the drop down menu in that section.
Go to the fifth row, second column. Double click the text area box. A box called TextArea Box Properties will pop up.
In the Name field, type in “comments”.
In the Initial value field, type in “Type your comments here”
Set the Number of lines to 5.
Your form should now look like the example below. Make sure to save your changes.