from the docs:

Note: This attribute has no effect if you omit the size attribute or set it
to 1, because the browser always submits the displayed item. You can work
around this issue: format forms by having an initial option tag with value="
" (notice the space character between the quotation marks).

On Tue, Sep 22, 2009 at 12:02 PM, Richard White <rich...@j7is.co.uk> wrote:

>
> thanks Jason, although this doesnt seem to work my end. i copied and pasted
> the code into the form...the combo is empty at first which is great, but
> when i click on the submit button without selecting anything in the combo it
> doesnt show me the message "Please select a Sample Type to continue."
>
> is this just a problem my end you think?
>
>
>
> >Note the initial empty <option>.  Also, note that you only need 1 set of
> >enclosing <cfoutput> tags.
> >
> ><cfset lookupOptionsArray = listtoarray("Blood,DNA,Other") />
> >
> ><cfselect name="sampleType" size="1" multiple="no" style="width:200px"
> >required="yes" message="Please select a Sample Type to continue.">
> >       <option value=""></option>
> >     <cfoutput>
> >     <cfloop index="i" from="1" to="#arraylen(lookupOptionsArray)#">
> >          <option
> >value="#lookupOptionsArray[i]#">#lookupOptionsArray[i]#</option>
> >     </cfloop>
> >     </cfoutput>
> ></cfselect>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326508
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