Tom,

When I have situations like that, where form fields can be added to the form
via JS, I will have a form field that tells me how many form fields ther
are.  Then each time I add a form field, I increment that by 1. In my
'action page' I will use that fomr field as the basis for my loop

<cfoutput>
<cfloop from="1" to="#form.numFields#" index="i">
<p>Text #i#: #form["linkText_" & i]# URL #i#:#form["linkUrl_" & i]#</p>
</cfloop>
</cfoutput>

On Wed, Oct 29, 2008 at 9:37 AM, Tom King <[EMAIL PROTECTED]> wrote:

> Hi All,
>
> I've got a form where I've got a potentially unknown number of form fields
> as they're being added by Javascript;
>
> i.e
> form.linkText_1
> form.linkUrl_1
> form.linkText_2
> form.linkUrl_2
> form.linkText_3
> form.linkUrl_3
> form.linkText_4
> form.linkUrl_4
>
> How can I deal with this at the other end?
>
> I can output them (but in no useful order):
>
>  <cfloop list="#structKeyList(form)#" index="key">
>  <cfoutput>
>  <cfif len(form[key]) GTE 1 AND key CONTAINS "link">
>  <p>Key: #key#, Value: #form[key]#</p>
>  </cfif>
>  </cfoutput>
>  </cfloop>
>
> How would I get these into an Array or a Query object where they are paired
> up by number?
>
> Thanks
> T
>
>
> 

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

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314526
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