Fieldnames is not a struct.  Form is.

isStruct(Form) is "true".

Also, stop using evaluate or structFind(), use array syntax!

<cfoutput>
<cfloop collection="#form#" item="i">
the form element #i# has the value #form[i]#!<br>
</cfloop>
</cfoutput>

--Daryl

P.S.  It's important to remember that unlike Studio, ctrl-Enter in Outlook
is "Send", not "<br>"

----- Original Message -----
From: "Keith Purtell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 23, 2002 3:48 PM
Subject: RE: [KCFusion] Form fields a structure in CF5


> That resulted in this:
>
> "Loop error Invalid collection '#FIELDNAMES#' - must be a valid struct or
> COM object "
>
> So now I'll try the CFDUMP that was suggested.
>
> Keith Purtell, Web/Network Administrator
> VantageMed Operations (Kansas City)
> Email:  [EMAIL PROTECTED]
>
>
> CONFIDENTIALITY NOTICE: This email message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Justin Hansen
> Sent: Tuesday, April 23, 2002 3:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [KCFusion] Form fields a structure in CF5
>
>
> <cfloop collection="#form#" item="locField">
> form.#locField# = #evaluate("form.#locField#")#
> </cfloop>
>
> This will show all the form fields in the form struct.
>
> Justin Hansen
> --------------------------
> Uhlig Communications
> Web Developer / Programmer
> --------------------------
> [EMAIL PROTECTED]
> 913-498-0123 ext 284
> --------------------------
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Cox, Billy W
> Sent: Tuesday, April 23, 2002 3:30 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [KCFusion] Form fields a structure in CF5
>
>
> This is a bit of code from a custom tag written by Ben Forta showing the
use
> of form fields in a list loop. I too have tried to do a collection loop on
> fieldnames with no success.
>
> <CFLOOP INDEX="form_element" LIST="#FORM.fieldnames#">
>
>
>
> Billy Cox
> Intranet/Extranet Development
> Sprint PCS
>
>
> -----Original Message-----
> From: Keith Purtell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 3:23 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [KCFusion] Form fields a structure in CF5
>
>
> I tried your suggestion but same problem. And my basic test still tells me
> ...
>
> IsStruct(FIELDNAMES) = NO
>
> The docs say it's a structure, my test says it's not.
>
> Keith Purtell, Web/Network Administrator
> VantageMed Operations (Kansas City)
> Email:  [EMAIL PROTECTED]
>
> CONFIDENTIALITY NOTICE: This email message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Cox, Billy W
> Sent: Tuesday, April 23, 2002 2:55 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [KCFusion] Form fields a structure in CF5
>
>
> Keith,
>
> I have had success with this methodology except that I use a list loop.
>
>
> Billy Cox
> Intranet/Extranet Development
> Sprint PCS
>
>
>
> -----Original Message-----
> From: Keith Purtell [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 23, 2002 2:51 PM
> To: KCFusion (E-mail)
> Subject: [KCFusion] Form fields a structure in CF5
>
>
> We're running CF5 on NT. According to the docs, "As of ColdFusion 5, Form,
> Application, Session, Server, Request, and URL variables are stored in
> structures."
>
> However when I try to retrieve form field information, I get error
messages
> about not having a valid structure. I test my form (which only has three
> plain text input fields) with IsStruct and get "False". Here's my code,
> which is only an adaptation of the example in the Allaire docs...
>
> <CFIF IsDefined("FIELDNAMES")>
> <CFIF IsStruct(FIELDNAMES) IS "True">
> <CFOUTPUT>
> <CFLOOP COLLECTION="#FIELDNAMES#" ITEM="FieldValue">
> #FieldValue# = #StructFind(FIELDNAMES, FieldValue)#
> <BR>
> </CFLOOP>
> </CFOUTPUT>
> <CFELSE>
> <B>Error; these form field values are not a structure.</B><BR><BR>
> </CFIF>
> </CFIF>
>
> Keith Purtell, Web/Network Administrator
> VantageMed Operations (Kansas City)
> Email:  [EMAIL PROTECTED]
>
>
> CONFIDENTIALITY NOTICE: This email message, including any attachments, is
> for the sole use of the intended recipient(s) and may contain confidential
> and privileged information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message.
>
>
>
>
>
> ______________________________________________________________________
> The KCFusion.org list and website is hosted by Humankind Systems, Inc.
> List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
> Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
> To Subscribe.................... mailto:[EMAIL PROTECTED]
> To Unsubscribe................ mailto:[EMAIL PROTECTED]
>
>

 
 
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
 

Reply via email to