Basic HTML version of Foils prepared May 3 1998

Foil 50 Dynamic HTML Forms - I

From Java Blend and Cold Fusion High Level Database Interfaces CPS616 Web Technologies -- Spring 98. by Chao Wei Ou


A dynamic form is an HTML form generated by a cfm file that uses elements created with database query results and CFML.
This example shows a select list of employees' names that is created with a query against the employees table.
<CFQUERY NAME="EmpName" DATASOURCE="CF 3.0 Examples">
SELECT Employee_ID, LastName, FirstName
FROM Employees
</CFQUERY>
<FORM ACTION="example.cfm" METHOD="post">
<SELECT NAME="Employee_ID">
<CFOUTPUT QUERY="EmpName">
<OPTION VALUE="#Employee_ID#">#LastName#, #FirstName#
</CFOUTPUT>
</SELECT>
<INPUT TYPE="submit" VALUE="Submit">
</FORM>



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998