Try <cfset "client.#form_element#" = "...">
> -----Original Message-----
> From: Bill Poff [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 11:34 AM
> To: CF-Talk
> Subject: EmbedFields Hack
>
>
> Hello all,
>
> I'm trying to hack Ben Forta's EmbedFields tag to create
> client variables
> from passed form fields.
>
> CF does not like the 6th line. It doesn't like "<cfset
> client.#form_element#
> =...". It's generating an "Invalid Expression Format" error.
>
> Can someone offer me a suggestion on a better way to do
> this... one that
> works ;-)
>
> <CFIF #IsDefined("FORM.fieldnames")#><!--- Check that
> fieldnames exists --->
> <CFSET #fieldnames_processed# = ""><!--- Create empty list
> of processed
> variables --->
> <CFLOOP INDEX="form_element" LIST="#FORM.fieldnames#"><!---
> Loop through
> fieldnames --->
> <CFIF #ListFind(#fieldnames_processed#, #form_element#)# IS
> 0><!--- Try to
> find current element in list --->
> <CFSET #form_element_qualified# = "FORM." &
> #form_element#><!--- Make
> fully qualified copy of it (to prevent acessing the wrong
> field type) --->
> <CFOUTPUT><cfset client.#form_element# =
> "#Evaluate(form_element_qualified)#"></CFOUTPUT><!--- Set Client
> variable --->
> <CFSET #fieldnames_processed# = #ListAppend(#fieldnames_processed#,
> #form_element#)#><!--- And add it to the processed list --->
> </CFIF>
> </CFLOOP>
> </CFIF>
>
>
>
> Thanks.
>
> Bill Poff
> --
> ICONS, Inc.
> http://icn.net
> 540.343.8322
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists