If a site has less than a hundred users, it's viable to use a simple drop down menu to choose a person, but if a site has thousands of users, then it's not a good idea.
The solution for this problem is to have a javascript popup allowing to search a user that pass the search result to our main form. This is already implemented in Obliquid.
To add it to a form inside a slot, you have first to copy and paste the following javascript function at the beginning of your slot template.
<script language="JavaScript">
function OpenChoosePerson(value) {
p="toolbar=no,location=no,directories=no,status=no,menubar=no,width=700,height=400"
+",resizable=yes,scrollbars=yes";
URLtoOpen="index.php?page=user_choose&value="+value;
window.open(URLtoOpen,"choose",p);
return false;
}
</script>
Then you've to make sure that your form is named "pform". This is very important because the form will be referenced by name from the popup.
<form method="post" NAME="pform">
The next step is to add the following piece of html inside the slot template, where you want to make appear the control to choose a person.
<a href="" onClick="javascript: return OpenChoosePerson(1);"
class="textstandard"><span class="textstandard">{{$msg.select}} »</span></a>
<input type="text" size="35" name="person1" value='{{$frm.person1}}'
class="textform" disabled>
<input type="text" size="5" name="id_person1" value='{{$frm.id_person1}}'
class="textform">
This is enough to do the trick. Note that i used frm.person1 and frm.id_person1 Smarty variables to pass values to the form when in modify mode, but you should feel free to choose your own names. Remeber to close the form.
</form>