OK, Sorry about that.

But I see your problem now

<cfparam name="str" default="0">
needs to be changed to 
<cfparam name="#str#" default="0">
or
<cfparam name=str default="0">

Your original was checking for the existence of a
variable named "str" rather than named the contents of
str.

--- Kay Smoljak <[EMAIL PROTECTED]> wrote:
> On Thu, 20 Sep 2001 07:09:33 -0700 (PDT), cf
> refactoring
> <[EMAIL PROTECTED]> wrote:
> 
> >According to the http protocol, unchecked control
> >items such as checkboxes and radios are not sent at
> >all. Therefore, your action page will get no clue
> that
> >they exist. It's just one of those things with
> forms.
> >
> >You'll have to remember what control items you have
> in
> >your program. One common way of dealing with it is
> to
> >do <cfparam>'s for all your checkboxes in your
> action
> >page.
> 
> Thanks, but if you look at the code I posted with my
> question, you'll
> see that's exactly what I am doing. Any ideas what
> else could be wrong.
> 
> >--- Kay Smoljak <[EMAIL PROTECTED]> wrote:
> 
> >> I have a dynamically generated form, with
> numbered
> >> fields. I have the
> >> following code on my action page to set all
> >> checkboxes to 0 by default
> >> (the hardcoded 50 is for testing purposes):
> >> 
> >> <cfloop from="1" to="50" index="p">
> >>    <cfset str="form.include" &
> >> "#numberformat(p,"00_")#"> 
> >>    <cfparam name="str" default="0">
> >>    <cfoutput>#str#</cfoutput>
> >> </cfloop>
> >> 
> >> The cfoutput bit at the end is displaying the
> >> correct formfield names:
> >> form.include001, form.include002 etc etc. These
> are
> >> the same as the
> >> formfields on the form page. 
> >> 
> >> Later down in the action page, however, trying to
> >> display the values of
> >> the formfields is throwing an "Error resolving
> >> parameter
> >> FORM.INCLUDE001" if the checkbox on the form is
> not
> >> checked. It's got me
> >> completely stumped. If it is checked it all works
> >> fine. So it looks like
> >> there is something wrong with the cfparam
> statement.
> >> Any ideas?
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to