Hi Guys,

I can't find a solution to something and its bothering
me.

I have a form, with two input fields: text 1 and text
2

<form name="frm" method="post">
  <input type="text" name="text 1" value="a,b,c,d">
  <input type="text" name="text 2" value="e,f,g,h">
  <input type="submit" name="frmSubmit"
value="submit">
</form>

On form submit I want to loop through the form field
names and then loop through the list of values stored
in the two text fields (a,b,c,d etc)

Here is what I'm trying to do:

<cfif isDefined("form.frmSubmit")>
<cfdump var="#form#">
<cfloop list="#form.fieldnames#" index="fNames">
<cfloop list="#fnames#" index="lNames">
<CFSET val = evaluate("form." & lNames)>
<cfoutput>#val#</cfoutput>
</cfloop>
</cfloop>
</cfif>

<form name="frm" method="post">
<input type="text" name="text 1" value="a">
<input type="text" name="text 2" value="b">
<input type="submit" name="frmSubmit" value="submit">
</form>

ColdFusion does not like the space in the input text
names (text 1, text 2). Please can somebody show me
how to get round this problem

Regards,
cfcoder




__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to