Because the user won't be able to modify the department they belong to, we won't make that value available in this form. (The administrator is responsible for changing this value.) We have, however, replaced the DepartmentID Hidden Field with an EmployeeID Hidden Field. When updates are made to a database, you as the developer must specify which field will be updated. In Chapter 24, "A SQL Primer," we discussed the WHERE clause. The value, typically a numeric primary key, is appended to the WHERE clause so that application logic knows exactly which record in the database table to update. This numeric key is the EmployeeID. Save the page as myaccount.asp, myaccount.cfm, or myaccount.php (depending on the server model you're using). Working with Dynamic Form Elements Now that you have the My Account form created, you'll want to make all those form objects dynamic, meaning that when the page is loaded, corresponding fields from the Employees table automatically appear in the form objects. In the previous chapter, you learned how to create dynamic text by dragging an item from the recordset onto the page. Dynamic form objects are constructed much the same way in that you can drag an item from the recordset (in the Bindings panel) directly onto the form object to which you want to bind that field. Dynamic form objects can be created using one of three methods: Dragging a field from the recordset onto the form object. Using the Dynamic Form Elements server behaviors set. Selecting the form object and clicking the lightning bolt icon in the Properties Inspector to create a binding. Any one of these three methods will do the job. Dragging an item from the recordset into the form object is probably the easiest and quickest way to accomplish the task, but for the sake of learning all the methods, try binding at least a few of the form objects using the following process: 1. Before you can bind text to a form object, you'll have to create a new recordset. To do that, select the Recordset option from the Bindings panel's Add (+) menu. The Recordset dialog appears. 2. Enter the name rsUpdateEmployee, select the connDorknozzle option from the Connection menu, choose the Employees option from the Table menu, and click OK. The new recordset is created. 3. Select the Dynamic Text Field option from the Dynamic Form Elements submenu by clicking the Add (+) button from the Server Behaviors panel. 4. The Dynamic Text Field dialog appears similar to figure 26.14, allowing you to select the form object you want to make dynamic. Select the "Name" in Form "Form1" option from the Text field menu. Figure 26.14. The Dynamic Text Field dialog allows you to create a binding from the recordset to the form object. 5. Click the binding icon (the lightning bolt) to set the binding for the name text field. The Dynamic Data dialog appears similar to Figure 26.15. Figure 26.15. Click the binding icon to set the value of the dynamic form element. 6. From the Dynamic Data dialog, select the field from the recordset to which you want to bind the object (for our example, choose Name). You have the option to change the data type as well as the capability to modify the code if necessary. 7. Click OK. 8. Notice that the Set Value To text box in the Dynamic Text Field dialog now has the value set with the appropriate code. Click OK to complete the binding.