I don't see why not, given the code you originally published.  Just put the
<cfparam> above the first reference to the variable (make sure you cfparam
form.notary).  The empty string is interpreted as an empty list, so the loop
will never run if there are no checked checkboxes.



  --Ben Doom
    Programmer & General Lackey
    Moonbow Software

: -----Original Message-----
: From: Clark, Aimee [mailto:aclark@;stinsonmoheck.com]
: Sent: Friday, November 08, 2002 12:46 PM
: To: CF-Talk
: Subject: RE: Using Cfloops on the same page
:
:
: True, except on the page that handles the insert, I am looping
: that list and
: inserting the id for the employee and the first value into the table, then
: the id and the second value so that the table looks like this:
:
: EmpID NotaryState
: 95    VA
: 95    AZ
:
: So, can I still use the Cfparam that way?
:
: -----Original Message-----
: From: Ben Doom [mailto:bdoom@;moonbow.com]
: Sent: Friday, November 08, 2002 11:35 AM
: To: CF-Talk
: Subject: RE: Using Cfloops on the same page
:
:
: Since, according to the code you posted, the checkboxes all have the same
: name, the values are returned in a comma-separated list.
:
: I.e. if the checked values are 1, 3 and 6 then in the url (if it's using
: get) you'll have 'notary=1,3,6'.
:
: Therefore, you could always set an empty default by using <cfparam
: name="notary" default="">
:
:
:
:   --Ben Doom
:     Programmer & General Lackey
:     Moonbow Software
:
: : -----Original Message-----
: : From: Clark, Aimee [mailto:aclark@;stinsonmoheck.com]
: : Sent: Friday, November 08, 2002 12:25 PM
: : To: CF-Talk
: : Subject: RE: Using Cfloops on the same page
: :
: :
: : So, I thought about what everyone was suggesting for this, but I
: : still don't
: : think this willl work for me. Below is the way one of the
: : checkbox fields is
: : set up. It's dynamic and there is more than one checkbox that
: the user can
: : select from.
: :
: : <tr>
: :       <td><b>Notary:</b></td>
: :        <td><cfoutput query="GetNotary">
: :             <input type="Checkbox" name="Notary" value="#NotaryState#"
: : >#NotaryState#<br>
: :             </cfoutput></td>
: :     </tr>
: :
: : My question is, how can I use cfparam to set this to a default
: setting if
: : there are more than one checkbox?
: :
: : Thanks,
: :     Aimee'
:
:
: 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to