I'm not quite sure what you're doing with the mid, but if you just want to
add that field to the list then use: listappend(idList, i) as i contains the
name of the field in the list at that iteration of the loop
<cfset idList ="">
<cfloop list="#form.fieldnames#" index="i">
<cfif findnocase('chkmsg', i)>
<cfset idList = listappend(idList, i)>
</cfif>
</cfloop>
> -----Original Message-----
> From: Mark Smyth [mailto:[EMAIL PROTECTED]
> Sent: 18 June 2003 17:14
> To: '[EMAIL PROTECTED]'
> Subject: [ cf-dev ] Looping through form fields in MX
>
>
> the syntax below doesn't seem to be working for me in MX
>
> if its a bug, what the next easiest way to loop through form fields
> dynamically?
>
> <cfset idList ="">
> <cfloop list="#form.fieldnames#" index="i">
> <cfif findnocase('chkmsg', i)>
> <cfset idList = listappend(idList, mid(i, 1, 6))>
> </cfif>
> </cfloop>
>
> thanks
> mark
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]