ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 28th, 2008, 03:41 PM
codemonger codemonger is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 67 codemonger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 19 m 28 sec
Reputation Power: 1
Creating a form in cf, issues, please help

Hello;
I am writting a form in CF 8. I have a couple questions on some issues. I will put them down 1 at a time.

1. I am trying to use a select box in my form. I have cfinputs in the form, and this is my code for the select
<select enabled="No" name="timeDay" multiple="no">
<option>-- Please choose one --</option>
<option>MORNING</option>
<option>AFTERNOON</option>
<option>EVENING</option>
</select>
Is this the proper way to use a select function in a cfform tag with no dynamic data in it?

Now another part of this question is this:
When it goes to my cfmail, I am defining the select like this:
<cfparam name="form.timeDay" default=0>
<cfmail>
<!--- all the cfmail code stuff goes here --->
<cfif form.timeDay>#form.timeDay#</cfif>
</cfmail>
Is this the proper way to write out the selection in cfmail?

One last aspect of this function is validation. I am using server sided validation on this form. There is another form on the response page if you missed certain fields, but the form on responce remembers what you entered in certain fields like the following:
<cfinput type="text" name="name" message="Please enter your name!" validateat="onSubmit" validate="noblanks" required="yes" class="md_Inputs" value="#FORM.name#" size="60">

See the value fields, how would I make a select remember your selection from the original form like you do with a cfinput?

I have a couple other questions, but want to take care of the select box first. Then I will post the other questions, they are kind of easy.

Thank You!

Codemonger

Reply With Quote
  #2  
Old April 28th, 2008, 11:12 PM
kiteless kiteless is offline
Moderator
Dev Shed Loyal (3000 - 3499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,475 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 17 h 7 m 51 sec
Reputation Power: 42
1. There really is no "proper" way, just what works for your given problem space. It's certainly common to do it that way.

2. Again, no "proper" way, since the solution depends on what you're doing. But using cfparam to default the value is an option, as long as it is not necessary for them to pick an option.

3. You can just use a cfif to determine which option to select.

Regards,

Brian
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old April 29th, 2008, 12:57 AM
codemonger codemonger is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 67 codemonger User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 19 m 28 sec
Reputation Power: 1
Quote:
Originally Posted by kiteless
1. There really is no "proper" way, just what works for your given problem space. It's certainly common to do it that way.

2. Again, no "proper" way, since the solution depends on what you're doing. But using cfparam to default the value is an option, as long as it is not necessary for them to pick an option.

3. You can just use a cfif to determine which option to select.

Regards,

Brian


LOL I figured it out and got it to work. I just kept on playing with it in different ways. I did use a cfif in the body of the send mail and a cfperam set to default 0 also had to add in the option a value. Thanks for the help Took about an hr of playing around with it to get it working.

Mike

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Creating a form in cf, issues, please help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway