I am writing an edit function for a form in which I pre-fill all the fields with the data stored in the database. The one I am having trouble with is a field that the user selects from a dropdown menu. I still want to present all the options, but I want the option in the database on top. The code to produce the list is shown below.
I store ProjLineMgr in one table, and I have another table of people with their names and IDs. So, I need to query the employee table with ProjLineMgr to retrieve the name, and somehow put it on top while displaying the other names in case it is being changed. Any suggestions?
Code:
<!--- Display every employee. --->
<SELECT NAME="ProjLineMgr">
<CFOUTPUT QUERY="GetPeople">
<OPTION VALUE="#PersonID#">#PersonFirstName# #PersonLastName#</OPTION>
</CFOUTPUT>
</SELECT>
I store ProjLineMgr in one table, and I have another table of people with their names and IDs. So, I need to query the employee table with ProjLineMgr to retrieve the name, and somehow put it on top while displaying the other names in case it is being changed. Any suggestions?