Test Form 1
This is a simple form that does not use the automatic table building.
Notice how easy it is to include existing data. Just specify the query name in the coreForm tag (queryinput attribute) and make sure all your fields are named the same as the fields in the query. That's it! Creating new records and editing existing ones becomes a simple task.
*
Indicates a Required Field
Code:
<cfmodule
template="#coreform#"
formname="form1"
queryinput="get_person"
debug="no"
>
<table align="center" border="0" bgcolor="#ccccCC">
<tr>
<th>Last Name:</th>
<td><cfmodule template="#corefield#"
format="text"
fieldname="lastname"
required="Y"
Caption="Lastname"
size="30"
maxlength="30" />
</td>
</tr>
<tr>
<th>First Name:</th>
<td><cfmodule template="#corefield#"
format="text"
fieldname="firstname"
required="N"
size="30"
maxlength="30" />
</td>
</tr>
<tr>
<th>DOB:</th>
<td><cfmodule template="#corefield#"
format="date"
fieldname="dob"
required="Y"
size="20"
maxvalue="#lsdateformat(now())#"
showtip="yes"
/>
</td>
</tr>
<tr>
<th>Calendar Test:</th>
<td><cfmodule template="#corefield#"
format="calendar"
fieldname="date2"
required="N"
caption="Calendar Test"
size="20"
minvalue="12-25-2005"
maxvalue="12-31-2005"
showtip="Yes"
standalone="Y"
/>
</td>
</tr>
<tr>
<th colspan="2">
<cfmodule template="#corefield#"
format="submit"
fieldname="Save"
Value="Save" />
</th>
</tr>
</table>
</cfmodule>
<cfif isdefined('form.coreformaction') and request.isformvalid eq "OK">
<h1 align="center" style="background-color:#FFCC66">Update Query Goes Here</h1>
</cfif>