[rt-users] Custom Ticket Creation Form

Andy Harrison ah3 at mlz.us
Wed Dec 10 14:53:41 EST 2003


I've created a custom form for ticket creation in a specific queue.  I wanted some specific information to be displayed and some related instructions, that sort of thing.  What I'd like is to make a link indicating "Description of Choices" which pops up a window displaying all of the clicked Custom Field's values and the description text of each possible value.  Could anyone help?

I have not reinvented the wheel entirely, I used the original index.html and simply renamed it and put the modified version in the local directory tree, as well as modified versions of the EditCustomField and EditCustomFields elements.  Then I added a new section in the main menu sidebar to access it.  So all of the RT modules are available to my new form, I'm just not sure how to do it.

John Schubert gave me a suggestion to use the alt= param, but that doesn't work well for me.

I've added the following lines to the EditCustomFields element file:

        <script language="JavaScript" type="text/JavaScript">
        <!--                                                
          function MM_openBrWindow(theURL,winName,features) { //v2.0
                  window.open(theURL,winName,features);            
                   }                                  
         //-->     
         </script>

        [ <a href="#" onClick="MM_openBrWindow('Systems-Descriptions.html','test','width=  300,height=300')">Description of Choices</a> ]<br />



Problem is, I'm not sure how to pass the current queue and such to that page.

This doesn't even come close to working:

Systems-Descriptions.html:

  %   print ":::", %ARGS, ":::\n";
         <!-- start dumper -->
         <p><hr width=100 align=left width=6><pre>
  
        <img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "
  %#    print Dumper( $CustomField->Values() );
  %     my $CustomFieldValues = $CustomField->Values();
  %     while ( my $value = $CustomFieldValues->Next ) {
  %         #print Dumper( $value->values->description );
  %         print $value->{'values'}->{'description'},"\n" ;
  %     }
         ">
  %#       </pre><hr width=100 align=left width=6></p>
         <!-- end dumper -->
  
  %
  <%INIT>
  my $QueueObj = new RT::Queue($session{'CurrentUser'});
  $QueueObj->Load($Queue) || Abort(loc("Queue could not be loaded."));
  my $CustomField = $QueueObj->CustomFields();
  </%INIT>
  
  <%ARGS>
  $DependsOn => undef
  $DependedOnBy => undef
  $MemberOf => undef
  $QuoteTransaction => undef
  $Queue => 35
  </%ARGS>

This yields:

error: 	Can't locate object method "Values" via package "RT::CustomFields" at /usr/local/rt3/local/html/Systems-Descriptions.html line 7.
	
context: 	
... 		
3: 	<p><hr width=100 align=left width=6><pre>	
4: 		
5: 	<img src="<%$RT::WebImagesURL%>/gwi.jpg" alt= "	
6: 	%# print Dumper( $CustomField->Values() );	
7: 	% my $CustomFieldValues = $CustomField->Values();	
8: 	% while ( my $value = $CustomFieldValues->Next ) {	
9: 	% #print Dumper( $value->values->description );	
10: 	% print $value->{'values'}->{'description'},"\n" ;	
11: 	% }	
... 		
code stack: 	/usr/local/rt3/local/html/Systems-Descriptions.html:7
/usr/local/rt3/share/html/autohandler:182

-- 
Andy Harrison
(full headers for details)

-- 
Andy Harrison
Great Works Internet
System Operations
(full headers for details)



More information about the rt-users mailing list