I get this error message with your code below: Invalid tag nesting configuration.
With cfloop it works but all the checkboxes are checked http://www.firefightingnews.com/contact_us_directory.cfm >Oh, that's not going to work the way you have it. Form.allst will be a LIST >of the states that were selected (because you will have more than one >checkbox on the form with the same name 'allst'), so you need this: > ><cfparam name="FORM.allst" default=""> > ><cfoutput query="allstates"> > <input type="checkbox" > name="allst" checked="<cfif >listFind(form.allst,allstates.statename)>yes<cfelse>no</cfif>" > value="#allstates.statename#"> #allstates.statename#<br /> > </cfoutput> > >Using the <input> tag here instead of the <cfinput> tag enables you to >include the <cfif> tag inside your HTML. > >Try that. > >Dave >Thanks Dave. > >No luck. > >The form is not remembering the checkboxes. > ><cfparam name="FORM.allst" default="no"> > > <cfloop query="allstates"> > <cfinput type="checkbox" > name="allst" checked="#form.allst#" > value="#allstates.statename#"> #allstates.statename#<br /> > </cfloop> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4644 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
