[Rt-devel] Making the Requestor field a selection field?

Matt Hanley MHANLEY at cxtec.com
Thu Oct 7 14:07:21 EDT 2004

When creating a new ticket, I wanted to be able to have the Requestors field
be a drop down list of currently existing users (this made things simple and
allowed for the real name to be displayed while the email address still gets
used).  I managed to do this easily by modifying Ticket/Create.html and
adding a file, mwh.html:

--- /opt/rt3/share/html/Ticket/Create.html      2004-07-12
14:00:53.000000000 -0400
+++ ./Create.html  2004-10-07 13:49:41.000000000 -0400
@@ -55,7 +55,7 @@
 <TD class=value COLSPAN=5>
-<INPUT Name="Requestors" Value="<% ($ARGS{Requestors}) ||
$session{CurrentUser}->EmailAddress %>" SIZE=40>
+<& /Ticket/mwh.html &>


<SELECT NAME="Requestors">
%while ( my $u = $Users->Next() ) {
%  if ( $u->RealName() ne"" ) {
<OPTION VALUE="<%$u->EmailAddress()%>"><%$u->RealName()%></OPTION>
%  }
my $Users = RT::Users->new($session{CurrentUser});

However, I realized that this didn't leave the option for selecting multiple
Requestors.  No problem, I thought, I'll just add the "multiple" option to
the "SELECT" tag.  Now, however, the Requestor turns into
"ARRAY(0xa282c38)".  I understand what that value is, but I'm not finding
where this is being processed.  If someone could at the very least point me
there, that'd be great.  If someone has the solution, even better. :-)



Matthew Hanley
mhanley at cxtec.com

More information about the Rt-devel mailing list