I'm working on a CFForm with a CFSelect that is required. According
to the LiveDocs you the required attribute requires a blank option to
work... I've got the element, I have required="Yes" and I have a
message element but it's still not validating on submit.
Any ideas?
Here's the <cfselect> in question, the blank option is built into the recordset.
<cfif Evaluate("ThisRecord.#ListGetAt(variables.FormColumnList, x)#") EQ 0>
<cfset SelectedElement = " ">
<cfelse>
<cfset SelectedElement =
Evaluate("ThisRecord.#ListGetAt(variables.FormColumnList, x)#")>
</cfif>
<cfselect enabled="Yes" name="#ListGetAt(variables.FormColumnList, x)#"
query="selectdata"
value="#ListFirst(ListGetAt(variables.FormMaxLengthList, x), "~")#"
display="#ListLast(ListGetAt(variables.FormMaxLengthList, x), "~")#"
selected="#SelectedElement#"
required="Yes"
message="#ListGetAt(variables.FormMessageList, x)#"
style="font-size: 12px;"></cfselect>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297301
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4