The blank option comes through as a part of the CFC results... however
I found the solution yesterday on a couple of different blogs.
Apparently the coding that Adobe used for the CFForm.js validation
script is only initially built to handle the MULTI select when facing
a required.  I had to modify it to correct the problem, as noted here:

http://www.beetrootstreet.com/blog/index.cfm/2007/1/8/CFFORM-doesnt-catch-unselected-dropdown-lists-when-requiredtrue

Hatton

On Jan 25, 2008 6:28 AM, Azadi Saryev <[EMAIL PROTECTED]> wrote:
> and where's you blank option which is required for the 'required'
> attribute to work?
>
> ---
> Azadi Saryev
> Sabai-dee.com
> http://www.sabai-dee.com
>
>
>
>
> C. Hatton Humphrey wrote:
> > 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:297407
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to