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:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 29th, 2004, 04:47 PM
benko benko is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 3 benko User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Checkboxes

ksdffkjsdf

Reply With Quote
  #2  
Old September 29th, 2004, 04:59 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 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 4 Days 10 h 8 m 55 sec
Reputation Power: 53
If the checkbox is named "chkName", then on the target page you can get the value of it with #form.chkName# IF IT WAS CHECKED. If it was not checked the web browser does not send the field at all (this is not a CF issue). So you must test for it:

<cfif isDefined( 'form.chkName' )>
...field is there...
</cfif>

or assign a default value to it:

<cfparam name="form.chkName" value="" />
__________________
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 October 6th, 2004, 01:52 AM
jechilt jechilt is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 jechilt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 25 sec
Reputation Power: 0
sorry to jump into this thread but I think the info below is what i need....
i have a forum with checkboxes and radio buttons. the results are being put into a spreadsheet. if the checkbox/radio button is not selected, i need a value of NULL or any value for that matter to be passed to the spreadsheet.

only problem is I don't know how to implement the suggestion below (what to put where). I am really new at this...
can you help?

Quote:
Originally Posted by kiteless
If the checkbox is named "chkName", then on the target page you can get the value of it with #form.chkName# IF IT WAS CHECKED. If it was not checked the web browser does not send the field at all (this is not a CF issue). So you must test for it:

<cfif isDefined( 'form.chkName' )>
...field is there...
</cfif>

or assign a default value to it:

<cfparam name="form.chkName" value="" />

Reply With Quote
  #4  
Old October 6th, 2004, 06:13 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 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 4 Days 10 h 8 m 55 sec
Reputation Power: 53
This will set a default value of an empty string if the checkbox field doesn't exist on the form's action page:

<cfparam name="form.checkBoxName" value="" />

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Checkboxes


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


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





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