Hi

I've been doing some testing with the form scope and have been getting some
inconsistent
results on cf 4.5.1.

AFAIK the form scope is available as a structure:

If i have a form with the following field:

<form name="myform" action="test3.cfm" method="post" >
                <input type="text" name="name" value="kola" >
                <input type="Submit" >
</form>

and on the action page create an additional form field,
Then loop over the field names with the follwing code, only the real form
field submmited by the form is displayed.

<cfset form.fake = "hello" >
<cfloop list="#fieldnames#" index="current">
<br><cfoutput>#current#</cfoutput>
</cfloop>
<hr>

If I then loop over the form as a structure:

<cfloop collection="#form#" item="current">
<br><cfoutput>#current#</cfoutput>
</cfloop>

The real form field(form.name), plus the one created on the action page
(form.fake)
and the fieldname variable (form.fieldname) are all
displayed.

So the question is, is this a feature or a bug?

Thanks

Kola





Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
http://www.Alexandermark.com
(+44)020-8429-7300

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to