Yes and no. I didn't get THIS working; I changed my approach to using dropdowns and simply grabbing the numeric value from them. From a user perspective, it still works nicely without complaint so far.
Now, I'm just in testing--it's allowing users to choose RSS feeds and I'm working on verifying that the feeds are working/not generating errors so that they don't cause the pages to fail. Still working and working on that, that is. Thanks; I was planning on showing when I'm complete. Russ -----Original Message----- From: Joe Eugene [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 11:48 PM To: CF-Talk Subject: RE: Multiple selections into a DB Did you get this working? Joe Eugene > -----Original Message----- > From: Joe Eugene [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 3:53 AM > To: CF-Talk > Subject: RE: Multiple selections into a DB > > > > I feel like I'm missing something there. > Yes you are. > Lets say your checkbox Name is "myChkBox" > Once the user clicks submit your checkbox values will look like > > form.myChkBox="1,3,5,9,10" > > Now insert into the DB. > <cfloop index="i" from="1" to="#listlen(form.myChkBox)#"> > <cfquery name="someQuery" datasource=""> > <!--- You can use sessionid or cookie to identify user---> > insert into SomeTable values (#sessionID#,#ListGetAt(form.myChkBox,i)#) > </cfquery> > </cfloop> > > Now your DB should look like > Userid chkBoxValue > 1 1 > 1 3 > 1 5 ... etc > > When user comes back to the page... you can compare the chkBoxValue to > your DB values to turn on/off checkboxes > > Joe Eugene > > > > > -----Original Message----- > > From: Russ [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, March 05, 2003 1:48 AM > > To: CF-Talk > > Subject: RE: Multiple selections into a DB > > > > > > Here's what I don't understand: As I update the db, it seems like > > you're telling me to input all 5 values at the same time, correct? If > > so, then I'll generate an error because of the comma delimited values > > that are trying to be pushed into a numeric field. > > > > I feel like I'm missing something there. > > > > > > > > Dont have any tutorials.. but i will try to explain it briefly. > > > > > > Let say you have a table with a unique identifier/userid/selections as > > > (fields). > > > Once you present the user with checkbox options, each > > > checkbox has a unique > > > id right? and all checkboxes have the same "name" > > > > > > When the user submits the form, you insert 5 selections into > > > the Table with > > > the above schema. When the user re-visits the same page, you > > > show all the > > > options.. except this time, you have to check the DB > > > selections to turn > > > on the checkboxes. > > > <cfset selections=valueList(QueryName.selections)> > > > <input type="checkbox" name="mychkBox" value="10" <cfif > > > listFind(selections,"10")>checked</cfif>> > > > > > > Joe Eugene > > > > > > > -----Original Message----- > > > > From: Russ [mailto:[EMAIL PROTECTED] > > > > Sent: Wednesday, March 05, 2003 12:32 AM > > > > To: CF-Talk > > > > Subject: RE: Multiple selections into a DB > > > > > > > > > > > > I think I get what you're saying, but I've never done this > > > before, so > > > > I'm a bit at a loss as to how to approach it. > > > > > > > > Tutorial? Outline? Example? Any would help! Thanks! > > > > > > > > > -----Original Message----- > > > > > From: Joe Eugene [mailto:[EMAIL PROTECTED] > > > > > Sent: Tuesday, March 04, 2003 11:22 PM > > > > > To: CF-Talk > > > > > Subject: RE: Multiple selections into a DB > > > > > > > > > > > > > > > You might want to just insert the checkbox values into one > > > > > field rather than having 5 fields for 5 selections. > > > > > > > > > > Once you re-display the page.. you can check these > > > > > selection ids against your display ids... > > > > > > > > > > Its late! hope you get the idea. > > > > > > > > > > Joe Eugene > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4