good point, I am changing that now! :-) excellentee
-----Original Message-----
From: Rich Wild [mailto:r.wild@;e-mango.com]
Sent: 23 October 2002 15:44
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] looping through formfields
well, whatever the maths is (feeling fuzzy myself), I always separate these
sorts of things with a delimter eg an underscore.
so you have
<input type="text" name="chkmsg_#id#">
and then you just do a listlast(i, "_") on it.
so you have:
<cfset fieldnames = "chkmsg_918,chkmsg_726,chkmsg_12">
<cfset idlist = "">
<cfloop list="#fieldnames#" index="i">
<cfif findnocase('chkmsg', i)>
<cfset idList = listappend(idList, listlast(i, "_"))>
</cfif>
</cfloop>
<cfdump var="#idList#">
> -----Original Message-----
> From: Robertson-Ravo, Neil (REC)
> [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> Sent: 23 October 2002 15:55
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] looping through formfields
>
>
> Cheers Rich, but that gives me the CHKMSG text and not the
> numeric values
> after the string!
>
> -----Original Message-----
> From: Rich Wild [mailto:r.wild@;e-mango.com]
> Sent: 23 October 2002 15:36
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] looping through formfields
>
>
> <cfset idList ="">
> <cfloop list="#form.fieldnames#" index="i">
> <cfif findnocase('chkmsg', i)>
> <cfset idList = listappend(idList, mid(i, 1, 6))>
> </cfif>
> </cfloop>
>
> > -----Original Message-----
> > From: Robertson-Ravo, Neil (REC)
> > [mailto:Neil.Robertson-Ravo@;csd.reedexpo.com]
> > Sent: 23 October 2002 15:46
> > To: '[EMAIL PROTECTED]'
> > Subject: [ cf-dev ] looping through formfields
> >
> >
> > Guys,
> >
> > I have a brain fuzz this arvo.... I have the following form
> > fields being
> > passed from a form :
> >
> > CHKMSG58,CHKMSG51,CHKMSG31,CHKMSG28,CHKMSG6,CHKMSG4,DELETEMESSAGE
> >
> > How can I loop through the values to get the numeric value of
> > the CHKMSGxx
> > fields? The list will be dynamic in length.
> >
> > uurgh, its probably right in front of me!
> >
> > Neil
> >
> > --
> > ** 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]
--
** 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]
--
** 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]