Or he could use my FormUtils library which automatically converts any
arbitrary collection of form fields into corresponding structures, arrays,
arrays of structs, etc. I created it for exactly this reason. :-)

http://formutils.riaforge.org/index.cfm


On Wed, Apr 2, 2008 at 11:04 AM, Adrian Lynch <[EMAIL PROTECTED]>
wrote:

> You could pass all the values in three hidden form fields. So instead of
> this:
>
> <input type="hidden"
> name="#Trim(Resource_ID)#_Reg_#DateFormat(i,'mm_dd_yyyy')#"
> value="#hours#"/>
>
> Try this:
>
> <input type="hidden" name="resourceIDList" value="RESOURCE_IDS_GO_HERE" />
> <input type="hidden" name="resourceDateList"
> value="RESOURCE_DATES_GO_HERE"
> />
> <input type="hidden" name="resourceHoursList"
> value="RESOURCE_DATES_GO_HERE"
> />
>
> You'll have to create the three lists. Then on the action page:
>
> <cfloop from="1" to="#ListLen(resourceIDList)#" index="i">
>        <p>
>                #ListGetAt(resourceIDList)#<br />
>                #ListGetAt(resourceDateList)#<br />
>                #ListGetAt(resourceHoursList)#
>        </p>
> </cfloop>
>
> Adrian
>
> -----Original Message-----
> From: Sehlmeyer, Jason [mailto:[EMAIL PROTECTED]
> Sent: 02 April 2008 15:56
> To: CF-Talk
> Subject: RE: Variable problems
>
>
> Any recommendations?  I have no problems changing what I've already
> done.
>
> Using ListGetAt() was my first guess, as I could use the '_' as the
> delimiter, but how would I know what each variable name is that's
> submitted?
>
> That's the biggest part I'm confused as to what to do.
>
> i.e.
> cfdump gives me:
> 10421_REGULAR_03_09_2008 0.0
> 10421_REGULAR_03_10_2008 2.0
> 10421_REGULAR_03_11_2008 3.0
> 10421_REGULAR_03_12_2008 3.0
> 10421_REGULAR_03_13_2008 3.0
> 10421_REGULAR_03_14_2008 3.0
>
> I was thinking using something similar to:
> #ListGetAt(form,1,'_')#
>
> But that gives me an error due to complex object type:
> Complex object types cannot be converted to simple values
>
>
>
> Jason
> [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Adrian Lynch [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 02, 2008 10:31 AM
> To: CF-Talk
> Subject: RE: Variable problems
>
> My gut says there's a better way to do what you're trying, but to get
> your
> version to work, look at the list functions, ListGetAt(), ListLast()
> etc.
> with "_" as the delimiter.
>
> Adrian
> http://www.adrianlynch.co.uk/
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302506
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to