Back with more looping

2003-04-05 Thread Candace Cottrell
It's me again, back with the loops. Background... I am trying to build an insert form where the user can specify how many items (records) they would like to add. Here's my form page: cfparam name=MultiForm default=FALSE cfparam name=i default=0 cfif MultiForm IS True cfoutput

Re: Back with more looping

2003-04-05 Thread S . Isaac Dealey
Hi Candace, Sounds to me like you just need a brief refresher on associative arrays. Any given structure may be referenced with a dot, or with the [] you normally see with arrays. If you need to dynamically build the structure key, this is the way to go, and it works just like building any other

Re: Back with more looping

2003-04-05 Thread Jochem van Dieten
Don't make the explicit distiction between a multiform and a singleform, the singleform *is* the multiform with i=1. Some more comments are inline. Form page: cfparam name=MultiForm default=FALSE cfparam name=i default=1 !--- use CSS :) -- cfhtmlhead text=' style type=text/css media=screen

Re: Back with more looping

2003-04-05 Thread Jochem van Dieten
Jochem van Dieten wrote: I missed part of the rewrite: Action page: !--- Mixing display code with action code is probably bad, but else I have to type it twice :) --- cfoutput h2 a href=#form.??# target=_blank

Re: Back with more looping ~~SOLVED~~thanks list

2003-04-05 Thread Candace Cottrell
Thanks so much to Jochem and Isaac for taking the time to help me out. Matt, I almost had it thanks to your help. :) I had a couple of things that needed to be remedied, like... one typo and I added cfparam name=NumForms default=1 to the form page, but this does exactlty what I want it to do.

Re: Back with more looping ~~SOLVED~~thanks list

2003-04-05 Thread Jochem van Dieten
Candace Cottrell wrote: __ On the action page, you have CFIF Len(Trim(form[Website_authorLNAME#i#])) What are you checking for? That there is a length? I am checking that the form field is not empty or just has spaces. It is pretty much equivalent to the code below, I just prefer the

Re: Back with more looping ~~SOLVED~~thanks list

2003-04-05 Thread Candace Cottrell
Comments inline Candace K. Cottrell, Web Developer The Children's Medical Center One Children's Plaza Dayton, OH 45404 937-641-4293 http://www.childrensdayton.org [EMAIL PROTECTED] [EMAIL PROTECTED] 04/05/03 16:00 PM Candace Cottrell wrote: __ On the action page, you have CFIF

Re: Back with more looping ~~SOLVED~~thanks list

2003-04-05 Thread S . Isaac Dealey
Thanks so much to Jochem and Isaac for taking the time to help me out. Matt, I almost had it thanks to your help. :) Glad I could help. :) A question/comment or two... __ On the action page, you have CFIF Len(Trim(form[Website_authorLNAME#i#])) What are you checking for? That there is a