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'

-----Original Message-----
From: Bob Haroche [mailto:spambait@;onpointsolutions.com]
Sent: Thursday, November 07, 2002 11:45 AM
To: CF-Talk
Subject: Re: Using Cfloops on the same page


> And I replace form.notary with EditForm.Notary, that should work?

No. The "problem" is with the nature of different form input types. A blank
text input will pass an empty variable to the form processing page. A blank
checkbox (or radio button for that matter), on the other hand, will not pass
anything to the form processing page. Hence the processing page expects to
handle some value for the checkbox but it won't get anything if the box is
unchecked.

One way to deal with this is to set a default checkbox value on the
processing page like so:

<CFPARAM name="form.notary" value="no">

That in effect tells the processing page that, by default, the Notary box is
not checked. Of course if the user does check the Notary box, then the
default value set by CFPARAM doesn't kick in, and the actual value of "yes"
is passed to the processing page.

---------------
Regards,
Bob Haroche
O n P o i n t  S o l u t i o n s
www.OnPointSolutions.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to