absolutely, use it all the time. > -----Original Message----- > From: Mark Smyth [mailto:[EMAIL PROTECTED] > Sent: 18 June 2003 17:39 > To: '[EMAIL PROTECTED]' > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > cheers rich > is the loop syntax (without the mid), working for you on MX? > > -----Original Message----- > From: Rich Wild [mailto:[EMAIL PROTECTED] > Sent: 18 June 2003 17:30 > To: '[EMAIL PROTECTED]' > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > > The thing is though, is that code is (hopefully - haven't > looked it up) > using the mid() for a reason. In this instance if all you > want to do is add > the name of the field to a list then all you need is > > <cfset myList = listappen(myList, i)> > > > -----Original Message----- > > From: Mark Smyth [mailto:[EMAIL PROTECTED] > > Sent: 18 June 2003 17:34 > > To: '[EMAIL PROTECTED]' > > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > > > > > > i understand it, just didn't really see the need to change it > > > > how would you change the listappend? > > > > -----Original Message----- > > From: Rich Wild [mailto:[EMAIL PROTECTED] > > Sent: 18 June 2003 17:22 > > To: '[EMAIL PROTECTED]' > > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > > > > aha! Another victim to fall foul of copying and pasting! > > > > ;) > > > > p.s. my advice is to not copy any code I or others send to > > the list without > > understanding it first, or you'll get issues like this! > > > > > -----Original Message----- > > > From: Mark Smyth [mailto:[EMAIL PROTECTED] > > > Sent: 18 June 2003 17:26 > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > > > > > > > believe it or not i just copied and pasted that out of an > > > email you send to > > > this list ref another issue > > > > > > the middle bit might be a bit of of context here, i didn't > > > really look at > > > it, just saw the cfloop > > > > > > thought you might've recognised it, do an advanced search on > > > form fields and > > > you'll come across it :) > > > > > > > > > -----Original Message----- > > > From: Rich Wild [mailto:[EMAIL PROTECTED] > > > Sent: 18 June 2003 17:12 > > > To: '[EMAIL PROTECTED]' > > > Subject: RE: [ cf-dev ] Looping through form fields in MX > > > > > > > > > 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] > > -- > ** 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] -- ** 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]
