I would be curious as to what adobe documentation said that is the way to do 
it.  

I guess the classification as a 'bug' would be determined by the definition of 
why that message would launch.

CF does not actually process the form when submitted.  CF creates the 
javascript and form elements and allows the browser to process the HTML event.

Because of this, HTML sees an option in the select statement and says that the 
form field has value (even if that value is empty or just a space)

If, however, you were to create a muli-choice select box, or a select box that 
has 'no options' in it, then the message would react as you are expecting.


The <select form element gives options to the user to choose from.  By default, 
a selection is made when the page is loaded, whether the user actually 
activated the element or not.

Because of this, the message doesn't launch. If there were no options in that 
select element, then the message would launch accurately.

In order to throw an error on that select box, you will probably do best to 
roll some of your own javaScript that throws the error message if the value of 
that selected option is 'blank' or ' '.


I haven't tested this, and the docs don't indicate that it is supported, but I 
would try this.

<cfselect name='whatever' validate='numeric' message='I said, choose a value'>
 <option value=''>Choose a Value</option>
 <option value='1'>One</option>
 <option value='2'>Two</option>
</cfselect>


----------
William E. Seiter


On Dec 13, 2011, Robert Harrison <[email protected]> wrote: 


> The message isn't appearing because your form element has a value.  the blank 
> space is considered a value. 

According to the CF documentation that is how to make it work.   Regardless, it 
also does not work if you say value="" or leave out the value clause 
altogether.   I looked this up on Adobe forums and apparently this has been a 
long-standing bug that Adobe has not addressed. 

Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.&#160; It must be&#160;&.

Plug in to our blog:&#160;A&W Unplugged
http://www.austin-williams.com/unplugged



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349083
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to