[rt-users] Custom Ticket Creation Form
Andy Harrison
ah3 at mlz.us
Tue Dec 16 12:14:57 EST 2003
On Tue, 16 Dec 2003 14:52:58 +0300
"Ruslan U. Zakirov" <cubic at acronis.ru> wrote:
> Andy Harrison wrote:
> > [ <a href="#"
> onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=
> 300,height=300')">Description of Choices</a> ]<br />
> You can send arguments to your script 'Systems-Descriptions.html' with
Ok, I changed it to this:
[ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html?CustomField=<%$Custo
mField->id%>','test','width=300,height=300')">Description of Choices</a> ]
> Try next code:
> % my $CFs = $QueueObj->CustomFields();
> <---- snip, your sample code ----->
Using your example code I'm almost there. My only problem is that in the new page that I open up, the $CFV-Description is printed for every single CustomField in this queue. Here is the code that almost works.
Systems-Description.html:
%
% # Added the $ARGS{'CustomField'} to see if it would just print from
% # the clicked CustomField
% my $CFs = $QueueObj->CustomFields($ARGS{'CustomField'});
% print $Queue, "\n";
<table border=3>
% while (my $CF = $CFs->Next) {
% my $CFVs = $CF->Values();
%
% # This prints the correct Argument matching the customfield I
% # clicked
<tr><td colspan=2>ARG <%$ARGS{'CustomField'}%></td></tr>
% while ( my $CFV = $CFVs->Next ) {
<tr>
<td align=right>Name:</td><td align=left><% $CFV->Name %> </td>
</tr>
<tr>
<td align=right>Description:</td><td align=left><% $CFV->Description %> </td>
</tr>
% }
% }
</table>
<%INIT>
my $QueueObj = new RT::Queue($session{'CurrentUser'});
$QueueObj->Load($Queue) || Abort (loc("Queue could not be loaded."));
</%INIT>
<%ARGS>
$Queue => 35
$CF => undef
$CFV => undef
</%ARGS>
--
Andy Harrison
(full headers for details)
More information about the rt-users
mailing list