Just when I think I've covered all the bases, something else comes up! X-)
I am trying to retreive two list from my database and populate a form with them. List1 is a list of peoples' names, and the user may select any number of them. List2 is a brief job title that is input in a textarea, and co-responds to a selected name. When I load the data to edit, I can get the names and prefill the appropriate checkboxes, but I cannot seem to get the job title to load alongside of it. I want to present this in a table to make it neat and tidy.
I should point out that List1 is actually a list of ID numbers, and I query another table to get the name. To clarify, List1 and List2 are in the same table.
Here is the code I have:
Thanks for everyone's help! I've been working at teaching myself CF for several weeks, now, so I'm pretty new at it.(I did actually manage to answer one question posted on this forum!) I'll certainly contribute whenever I can. Thanks again!
I am trying to retreive two list from my database and populate a form with them. List1 is a list of peoples' names, and the user may select any number of them. List2 is a brief job title that is input in a textarea, and co-responds to a selected name. When I load the data to edit, I can get the names and prefill the appropriate checkboxes, but I cannot seem to get the job title to load alongside of it. I want to present this in a table to make it neat and tidy.
I should point out that List1 is actually a list of ID numbers, and I query another table to get the name. To clarify, List1 and List2 are in the same table.
Here is the code I have:
Code:
<table width="80%" align="center" cellspacing="2" cellpadding="2" border="1">
<tr>
<td width="20%" align="center">Name</td>
<td width="80%" align="center">Role</td>
</tr>
<cfoutput query="GetPeople">
<tr>
<td align="left" width="20%">
<input type="Checkbox" name="ProjTeamMembers" value="#PersonID#"
<cfif listfind(GetProjectInfo.ProjTeamList,PersonID) gt 0> checked</cfif>>
#PersonFirstName# #PersonLastName#</td>
<td align="left"><TEXTAREA NAME="ProjTeamRoles", ROWS=1, COLS=75>
<CFLOOP INDEX="Counter" LIST="#GetProjectInfo.ProjTeamRoles#">#Counter#</CFLOOP>
</TEXTAREA></td>
</tr>
</cfoutput>
</table>
Thanks for everyone's help! I've been working at teaching myself CF for several weeks, now, so I'm pretty new at it.(I did actually manage to answer one question posted on this forum!) I'll certainly contribute whenever I can. Thanks again!