Hello!

I have a form that creates checkboxes:

<cfoutput query="GetUserId">
   <input type="checkbox" name="#id#" value="userid#id#">#id#<br>
</cfoutput>

I am trying to loop through valid ID's (some ID's are "unlocked" and some
are "locked" the user could only choose unlocked id's.) I than am comparing
them them to see which ones were checked. And appending them to a list to be
used later:

<CFLOOP QUERY="GetValidId">
<!--- this isdefined does not work --->
    <cfif isdefined("#form.#id##")>
<cfset idlist = idlist & '#id#,'>
</cfif>
</CFLOOP>

<cfif listlen(#idlist#) gt 0>
<!--- Get rid of the final comma --->
     <cfset idlist = left(#idlist#, len(#idlist#)-1)>
  <cfelse>
<!--- throw an error --->
</cfif>


How do I write the isdefined to make it work?  (every thing I've tried
throws an error.)  Thank you!

Mark

Here are your options, mcon1

Increase points to:



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to