-
1. Re: Set Checkbox State
PRABEESH_IN Jul 9, 2009 11:50 PM (in response to MacWiz1220)
Please see the sample code snippent for users first name displayed with check box dynamicaly. you can solve your problem with this .. Hope this helps.
UI part
when loading.
<cfloop query="qry_users">
<cfif not IsDefined("user_#qry_users.UserID#")><cfset "user_#qry_users.UserID#" = 0><cfelse><cfset "user_#qry_users.UserID#" = 1></cfif></cfloop>
Design area
<cfloop query="qry_users">
<input type="checkbox" name="user_#qry_users.UserID#" value="1" <cfif Evaluate("user_#qry_users.UserID#") is 1> checked</cfif>>#qry_users.FirstName#
</cfloop>
-
2. Re: Set Checkbox State
MacWiz1220 Jul 9, 2009 11:58 PM (in response to PRABEESH_IN)Thanks, but I'm not sure how that helps. I doesn't take into account whether the users Period column value is equal to the value of the Class_ID I am editing (as set via the form on the previous page...). If the user period column matches the Class_ID i am editing, teh user is in the class, otherwise, they're not...
Thanks for the help!
Would you like to see my code so far? Maybe it will help...
-
3. Re: Set Checkbox State
PRABEESH_IN Jul 11, 2009 9:54 AM (in response to MacWiz1220)so this means i am not clear about the request. The descriptions about the logic is ok. Please specify what you want to resolve.
Yes, provide code, that will help.
-
4. Re: Set Checkbox State
MacWiz1220 Jul 11, 2009 11:31 AM (in response to PRABEESH_IN)I posted this on two forums, and got an answer on the other one, but thanks anyways. I ended up using an array...