Thanks again William and Dave!
I will try to word my responses better because I was not implying the
lack of expert advice from anyone. I've learned alot of the posts and
posters here!

I named the submit button because I use <cfif
isDefined("form.inputButton")> to run the loop/insert. I can avoid this
by not including verything on the same page (which for me is easier
organized) and to run my loop and insert in a new page? Is this the best
option?

Is using form.fieldNames the best way to retrieve the selected values
from the form? If so, I'll add the conditional logic as Dave suggested.
I was having so much trouble with the "extra" results that I was
questioning whether or not I was using the best method or if there was a
better one. 

-----Original Message-----
From: William Seiter [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 06, 2008 2:45 AM
To: CF-Talk
Subject: RE: using form.fieldNames and CFLOOP to insert selected radio
buttons

Ron,

Dave has given you two concrete solutions/options/direction to handle
this issue.  I have read many of his helpful responses to people on this
board and I am sure he is an 'expert' here.

1.  Use a 'cfif' statement within your 'cfloop' to process the form
variable as long as it is 'not' (whatever form variable names that
should be ignored) 2.  Do not add the 'name' parameter to the <input
type="submit" tag on the form.

If there was something else that you were looking for, please let us
know.

William

--
William E. Seiter
 
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Enter passkey: goldengrove
 
Web Developer
http://William.Seiter.com
-----Original Message-----
From: Ron Eis [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 05, 2008 6:57 PM
To: CF-Talk
Subject: RE: using form.fieldNames and CFLOOP to insert selected radio
but tons

I agree Dave.
That's why I posted the question here. 
I would really appreciate any concrete solutions/options/direction from
the other experts here.  

-----Original Message-----
From: Dave Watts [mailto:[EMAIL PROTECTED]
Sent: Saturday, January 05, 2008 6:36 PM
To: CF-Talk
Subject: RE: using form.fieldNames and CFLOOP to insert selected radio
but tons

> It's returning the correct values that need to be inserted into the 
> database, but it's also returning the value and name of my submit 
> button. I thought using form.fieldNames was correct but I'm not sure 
> how to return all the selected fields but not the submit? Thanks for 
> any help!

CF has no way of knowing which fields you care about, and which you
don't.
Your submit button creates a form variable, just like any other form
field.

You can avoid this by using conditional logic within your loop to
exclude the fields you don't want, or by not giving those fields names
in the first place.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295971
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