when i submit the form, it will show the selected values as an output.
how can I preserve the multiple values in the pick list after
submitting the form? currently, only red value will be selected even
though the multiple values are selected.
<body>
<h2>Multiple Selection List Example</h2>
<cfoutput>
<form action="multiselectionpick.cfm" method="Post">
</cfoutput>
<table>
<tr>
<th>Colors:</th>
<td><select name="Colors" size="5" multiple>
<option value="Red" selected>Red</option>
<option value="Yellow">Yellow</option>
<option value="Pink">Pink</option>
<option value="Green">Green</option>
<option value="Purple">Purple</option>
<option value="Orange">Orange</option>
<option value="Blue">Blue</option>
</select></td>
<td><input type="submit" name="submit" value="submit"></td>
</tr>
<tr>
<td colspan="3">Use the ctrl key to select multiple colors</td>
</tr>
</table>
</form>
<!--- If the page has been submitted to itself, output the values
passed
by the form --->
<cfif IsDefined('form.Submit')>
<hr>
<cfoutput>
You selected: <b>#form.Colors#</b>
</cfoutput>
</cfif>
</body>