I have quite a few of checkboxes on a form, and am having trouble rechecking them when I repopulate the form. here is some of the code I am using:
<input type="checkbox" value="Administrators/Supervisors" name="TARGET_AUDIENCE" <cfif IsDefined("url.COURESID"
and ListFind("<cfoutput>#TARGET_AUDIENCE#</cfouput>","Administrators/Supervisors"
>CHECKED</cfif>>Administrators/Supervisors
<input type="checkbox" name="TARGET_AUDIENCE" value="Parents" <cfif IsDefined("url.COURESID"
and ListFind("<cfoutput>#TARGET_AUDIENCE#</cfouput>","Parents"
>CHECKED</cfif>>Parents
<input type="checkbox" name="TARGET_AUDIENCE" value="Counselors"<cfif IsDefined("url.COURESID"
and ListFind("<cfoutput>#TARGET_AUDIENCE#</cfouput>","Counselors"
>CHECKED</cfif>>Counselors
I look in the dbase and TARGET_AUDIENCE is a comma delimited list. ie Administrators/Supervisors,Parents,Counselors
and I tried some debugging code at the bottom of the page:
<cfif IsDefined("url.COURSEID"
>
<cfoutput>#TARGET_AUDIENCE#</cfoutput>
<cfset temp=ListFindNoCase("<cfoutput>#TARGET_AUDIENCE#</cfouput>","Parents"
><cfoutput>#temp#</cfoutput></cfif>
output:
Administrators/Supervisors,Parents,Counselors 2
I am at a loss, any ideas?
<input type="checkbox" value="Administrators/Supervisors" name="TARGET_AUDIENCE" <cfif IsDefined("url.COURESID"
<input type="checkbox" name="TARGET_AUDIENCE" value="Parents" <cfif IsDefined("url.COURESID"
<input type="checkbox" name="TARGET_AUDIENCE" value="Counselors"<cfif IsDefined("url.COURESID"
I look in the dbase and TARGET_AUDIENCE is a comma delimited list. ie Administrators/Supervisors,Parents,Counselors
and I tried some debugging code at the bottom of the page:
<cfif IsDefined("url.COURSEID"
<cfoutput>#TARGET_AUDIENCE#</cfoutput>
<cfset temp=ListFindNoCase("<cfoutput>#TARGET_AUDIENCE#</cfouput>","Parents"
output:
Administrators/Supervisors,Parents,Counselors 2
I am at a loss, any ideas?