Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2008, 02:29 PM
Newbie
 
Join Date: Jul 2008
Posts: 4
Default Multiple update with checkboxes and cfloop

Hi all!
How can I update only selected records from recordset at once?
We have a form page form.cfm and processing page update.cfm.
In form page there is a list of rows generated with <cfoutput query>. Each row contain checkbox, textfield1, textfield2.
Processing page has a query procedure.
I tried cfloop, but always got an error: If checkbox is not checked, variable of checkbox become undefined.

What is the solve of this problem?
Reply
  #2  
Old July 17th, 2008, 11:16 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,963
Default

If the checkbox is not checked, it won't be passed to the submitted page. Use cfparam for defaults and check against that.
Reply
  #3  
Old July 18th, 2008, 04:30 PM
Newbie
 
Join Date: Jul 2008
Posts: 4
Default

Quote:
Originally Posted by acoder
If the checkbox is not checked, it won't be passed to the submitted page. Use cfparam for defaults and check against that.
Yes, quite right. Cfparam helps!
Reply
  #4  
Old July 18th, 2008, 06:41 PM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 12,963
Default

Glad to hear it. Post again if you have more questions.
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 204,687 network members.
Post your question now . . .
It's fast and it's free

Popular Articles