Re: How to make a CFSELECT Required

2010-12-01 Thread Leigh

 It only applies to CFFORMS.   not quite the
 same thing.    

No, I think you misunderstood. I was responding to Azadi's comment. There is a 
note in the documentation mentioning the required/space fix applies only to 
size=1 lists, and only with flash forms. I thought something may have changed.

http://livedocs.adobe.com/coldfusion/8/Tags_r-s_14.html

-Leigh


 

~|
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:339686
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-12-01 Thread Aaron Rouse

You could add to the page your own _CF_hasValue function and let the new one
handle any non out of the box needs.  There is even an example of this done
in a old comment on Ben Forta's blog.  The example is for a single select,
so if I understand the OP's original email then I think it would work for
this need.  Here is a direct link to the comment that was made:

http://forta.com/blog/index.cfm?mode=entryentry=A61BB31F-3048-80A9-EFC01CEF006F9775#cC53F7D0A-3048-80A9-EF775D5DC62C6FA7

http://forta.com/blog/index.cfm?mode=entryentry=A61BB31F-3048-80A9-EFC01CEF006F9775#cC53F7D0A-3048-80A9-EF775D5DC62C6FA7
Aaron

On Wed, Dec 1, 2010 at 10:38 AM, Leigh cfsearch...@yahoo.com wrote:


  It only applies to CFFORMS.   not quite the
  same thing.

 No, I think you misunderstood. I was responding to Azadi's comment. There
 is a note in the documentation mentioning the required/space fix applies
 only to size=1 lists, and only with flash forms. I thought something may
 have changed.

 http://livedocs.adobe.com/coldfusion/8/Tags_r-s_14.html

 -Leigh




 

~|
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:339714
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-30 Thread Dave Watts

 as per cfml documentation, to make cfselecta required field you have
 to set the value of the default option (the pre-selected option which
 user has to change) to a signe space string  

 option value=  CFIF get04.CountryCode IS ''selected/cfifPlease
 select/option

I wasn't aware you could do that. That's a nice feature! And obviously
better than my suggestion.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
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:339620
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-30 Thread Gerald Guido

I wasn't aware you could do that.

Ditto

That's a nice feature!

It never ceases to amaze me how many convenience features are built into
CF. I work with PHP quite a bit and while I am sure that I can always find a
library to take care of most tasks, it still remains that I have to hunt
down, evaluate and most often hack said libraries. With CF it is most often
a mater of There is a tag or function for that. Not only that but said
tags and functions always seem to do just what you need them to do, out of
the box.  It is amazingly well thought out.

G!

On Tue, Nov 30, 2010 at 9:17 AM, Dave Watts dwa...@figleaf.com wrote:


  as per cfml documentation, to make cfselecta required field you have
  to set the value of the default option (the pre-selected option which
  user has to change) to a signe space string  
 
  option value=  CFIF get04.CountryCode IS ''selected/cfifPlease
  select/option

 I wasn't aware you could do that. That's a nice feature! And obviously
 better than my suggestion.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/
 http://training.figleaf.com/

 Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
 GSA Schedule, and provides the highest caliber vendor-authorized
 instruction at our training centers, online, or onsite.

 

~|
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:339622
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-30 Thread Leigh

 to set the value of the default option (the pre-selected
 option which 
 user has to change) to a signe space string  

I thought that only applied to flash forms? 

-Leigh


  

~|
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:339626
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-30 Thread Mike Kear

It only applies to CFFORMS.   not quite the same thing.One choice
with CFFORMS is flash forms, but there are also XML forms and HTML
forms,  all of which use the built-in cfforms tags, validation and
jquery functionality.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month

On Wed, Dec 1, 2010 at 2:35 AM, Leigh cfsearch...@yahoo.com wrote:

 to set the value of the default option (the pre-selected
 option which
 user has to change) to a signe space string  

 I thought that only applied to flash forms?

 -Leigh




 

~|
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:339659
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


How to make a CFSELECT Required

2010-11-29 Thread Rick Colman

I want to force the user to select a country code when submitting a form.

The select box looks like:

cfselect name=countrycode required=Yes size=5 message=Please 
select a country code.
option value= CFIF get04.CountryCode IS ''selected/cfifPlease 
select/option
option value=AU CFIF get04.CountryCode IS 'AU'selected/cfif 
 Australia/option

etc.

I do not want them to be able to select the value= option.

How to do this?

Rick.

~|
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:339609
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-29 Thread Dave Watts

 I want to force the user to select a country code when submitting a form.

 The select box looks like:

 cfselect name=countrycode required=Yes size=5 message=Please
 select a country code.
 option value= CFIF get04.CountryCode IS ''selected/cfifPlease
 select/option
 option value=AU CFIF get04.CountryCode IS 'AU'selected/cfif
  Australia/option

 etc.

 I do not want them to be able to select the value= option.

 How to do this?

Unless you simply omit the empty, descriptive option, you'll have to
use JavaScript - something like this:

script
function checkCountryCode() {
 if (document.forms[0].countrycode.selectedIndex == 0) {
  window.alert('Please select a country code.');
  return false;
 }
}
/script

form ... onsubmit=return checkCountryCode();
...
/form

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite

~|
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:339610
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to make a CFSELECT Required

2010-11-29 Thread Azadi Saryev

as per cfml documentation, to make cfselecta required field you have 
to set the value of the default option (the pre-selected option which 
user has to change) to a signe space string  

option value=  CFIF get04.CountryCode IS ''selected/cfifPlease 
select/option

Azadi

On 30/11/2010 12:23 , Rick Colman wrote:
 I want to force the user to select a country code when submitting a form.

 The select box looks like:

 cfselect name=countrycode required=Yes size=5 message=Please
 select a country code.
 option value=CFIF get04.CountryCode IS ''selected/cfifPlease
 select/option
 option value=AUCFIF get04.CountryCode IS 'AU'selected/cfif
   Australia/option

 etc.

 I do not want them to be able to select the value= option.

 How to do this?

 Rick.

 

~|
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:339617
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm