by Peter Tilbrook <peter.tilbrook@[EMAIL PROTECTED]
>
Oct 27, 2006 at 07:26 PM
<cfdump var="#Form#">
<cfdump var="#Form#">
<cfform action="test.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="test">
<cfselect enabled="Yes" name="testselect" size="6" multiple="yes">
<option value="1">First</option>
<option value="2">Second</option>
<option value="3" selected>Third</option>
<option value="4">Fourth</option>
<option value="5">Fifth</option>
<option value="6">Sixth</option>
</cfselect>
<cfinput name="submit" type="submit" label="Submit Form">
</cfform>
Displays a list of options. List generated (as variable testselect) is
made up of the VALUE attribute of the option tags). The example above
selects a default value (in this case Third) so as to avoid an error if
they do not choose a option by default.
The example below does not pre-select a value and will re****t an error
if at least one selection from the list is not made.
<cfdump var="#Form#">
<cfform action="test.cfm" method="post"
enctype="application/x-www-form-urlencoded" name="test" preloader="no">
<cfselect enabled="Yes" name="testselect" size="6" multiple="yes"
required="yes" message="Make a selection please">
<option value="1">First</option>
<option value="2">Second</option>
<option value="3">Third</option>
<option value="4">Fourth</option>
<option value="5">Fifth</option>
<option value="6">Sixth</option>
</cfselect>
<cfinput name="submit" type="submit" label="Submit Form">
</cfform>
Hope that helps!
PT
Manager, ACT and Region ColdFusion Users Group