I have a page that users are able to go into to see what is currently listed
for their employee information. If a user decides that they need to change
something like their home address and annotate that they speak a foreign
language, they can do so on this page and when they submit the form, an
email is generated that shows only the fields that they have modified.
 
Ok, so having said that, I can get everything they may modify on the form to
display correctly in the email EXCEPT the foriegn language field. 
 
This field is a dynamic checkbox, and they can select more than one language
if they happen to speak say, French and Spanish.
 
Here is the code for what is on the form:
 
<tr> 
  <td><strong>Foreign Languages:</strong></td>
  <td>
  <cfloop query="GetLanguages">
  <cfoutput>      
   <input type="Checkbox" name="FLanguage" value="#LanguageName#" <cfif
#ListFindNoCase(LanguageList, '#GetLanguages.LanguageName#')#
GT"0">Checked</cfif>>
 #LanguageName#<BR>
    </cfoutput>
  </cfloop>
  </td>
  </tr>
 
Here are the queries, variables, and how I am finding their changes:
 
<-----------------QUERIES & VARIABLES--------------------------------->
 
<cfquery datasource="FirmDaily" name="GetLanguages">
select * from Languages order by LanguageName
</cfquery>
 
<cfset currEmpLangs = "#ValueList(GetLanguages.LanguageName)#">
 
<cfquery datasource="FirmDaily" name="GetEmpLanguages">
select * from EmployeeLanguages
where EmpID = '#ID#'
</cfquery>
 
<cfset currLanguages = "#ValueList(GetEmpLanguages.LanguageName)#">
 
<------Checking to see if there's something in the field that was on the
form------>

<cfif IsDefined('Form.FLanguage')>
<cfset LangChoice = "#Form.FLanguage#">
<cfelse>
<cfset LangChoice = "0">
</cfif>
 
<-------------Displaying whether to add or delete a language based on what
the user selected----------->
 
<cfloop list="#CurrEmpLangs#" index="i">
<cfif (#ListFind(LangChoice, '#i#')# GT "0") AND (#ListFind(currLanguages,
'#i#')# EQ "0")>
<tr>
<td><b>Add Foreign Language:</b></td>
<td>#LangChoice#</td>
</tr>
</cfif>
 
<cfif (#ListFind(LangChoice, '#i#')# EQ "0") AND (#ListFind(currLanguages,
'#i#')# GT "0")>
<tr>
<td><b>Remove Foreign Language:</b></td>
<td>#GetEmpLanguages.LanguageName#</td>
</tr>
</cfif> 
</cfloop>
 
Can anyone offer some insight into what I may be doing wrong here?
 
Thanks,
 
Aimee Clark 
Web Developer 
Stinson Morrison Hecker LLP 
816-691-3461 
[EMAIL PROTECTED] 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to