If you loop through the 'fieldnames' list then you will get all the fieldnames that were submitted.
Try this instead: <cfloop index="mainloop" from="1" to="3"> <cfoutput>#form['radio#mainloop#']#</cfoutput> </cfloop> -----Original Message----- From: Priya Koya [mailto:[email protected]] Sent: Monday, February 09, 2009 6:35 AM To: cf-talk Subject: Re: Grouping of Radio Button Yes I did.. but again I am getting the field values along with the submit value.. how do I append it.. I just need the field values. <cfloop list="#form.fieldnames#" index="i"> <!--- <cfoutput>#i#</cfoutput><BR> ---> <!--- <cfoutput>form.#i#</cfoutput> ---> <cfset var1 = #Evaluate("form."&i)#> <cfoutput>#var1#</cfoutput> </cfloop> On Mon, Feb 9, 2009 at 12:40 AM, Azadi Saryev <[email protected]> wrote: > > just use name="radio#mainloop#" instead of name="radio1" for your radio > buttons then. that will create a separate radio group for each question: > "radio1", "radio2", etc... > > Azadi Saryev > Sabai-dee.com > http://www.sabai-dee.com/ > > > > Priya Koya wrote: > > Yes,Iknow I just wanted to give you an example soI mentioned some value > in there.. actually I am takking a session variable there. So I am not > worried about the value.. but worried abt the selection of a choice for each > question. > > > > > > > >> that is because ALL your radio buttons have same NAME - "radio1" - thus > >> you have a group of 9 radio buttons. > >> you need to have a different NAME for each question. you will also, > >> presumably, want a different VALUE for each of your radio button, too, > >> so depending on which one is selected you get its value in the form > >> scope. right now, based on your code, no matter which radio button is > >> selected, you will get "1a" as value. > >> > >> try something like this: > >> > >> <cfloop index="mainloop" from="1" to="3"> > >> <cfoutput>This id Question#mainloop#</cfoutput> > >> <cfloop index='loop1' from="1" to="3"><br/> > >> <cfinput type="radio" name="radio#mainloop#" value="#loop1#" > >> required="yes" message="Please select the right option"></br> > >> </cfloop> > >> </cfloop> > >> > >> with the above code you will have radio groups named "radio1", "radio2" > >> and "radio3", each with possible values "1", "2" or "3". > >> > >> hth > >> > >> Azadi Saryev > >> Sabai-dee.com > >> http://www.sabai-dee.com/ > >> > >> > >> > >> Priya Koya wrote: > >> > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:319082 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

