<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
</HEAD>
<BODY>
Hi Jesse,<BR>
<BR>
The problem seems to be that there is no HTML in SelfService's Create.html to include the custom fields on the SelfService page.  No matter what rights I give, the fields won't show up if this HTML file doesn't include code to display them.<BR>
<BR>
Has anyone in RT-Users ever added custom fields to the SelfService page?  If so, any points would be greatly appreciated.<BR>
<BR>
Regards,<BR>
Vance<BR>
<BR>
On Tue, 2006-04-18 at 17:53 -0400, Jesse Vincent wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>

<FONT COLOR="#000000">On Tue, Apr 18, 2006 at 05:40:48PM -0400, Vance Vagell wrote:</FONT>
<FONT COLOR="#000000">> Hello,</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I have been toiling with this issue for a while now -- how to get custom</FONT>
<FONT COLOR="#000000">> fields to show up on the SelfService ticket creation page (the page</FONT>
<FONT COLOR="#000000">> regsitered but unprivileged users see).  For reference, the HTML file</FONT>
<FONT COLOR="#000000">> that powers this page is:</FONT>

<FONT COLOR="#000000">Try grantin unprivileged users the rights to see and modify the custom</FONT>
<FONT COLOR="#000000">field directly?</FONT>

<FONT COLOR="#000000">> RT_DIR/share/html/SelfService/Create.html </FONT>
<FONT COLOR="#000000">> (though of course we edit the copy in "local" so as to not overwrite</FONT>
<FONT COLOR="#000000">> this original)</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I've created a bunch of custom fields, and given the Everyone group</FONT>
<FONT COLOR="#000000">> rights to see and edit these fields in our main queue.  Then, I took a</FONT>
<FONT COLOR="#000000">> look at Create.html from the Ticket directory (this is the file that</FONT>
<FONT COLOR="#000000">> privileged users see when they request a ticket) to see how that page</FONT>
<FONT COLOR="#000000">> includes the custom fields.  The following code is used in this</FONT>
<FONT COLOR="#000000">> Create.html:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> <TR></FONT>
<FONT COLOR="#000000">> <TD COLSPAN=6></FONT>
<FONT COLOR="#000000">> <& /Ticket/Elements/EditCustomFields, QueueObj => $QueueObj &></FONT>
<FONT COLOR="#000000">> </TD></FONT>
<FONT COLOR="#000000">> </TR></FONT>
<FONT COLOR="#000000">> % if ($TxnCFs->Count) {</FONT>
<FONT COLOR="#000000">> % while (my $CF = $TxnCFs->Next()) {</FONT>
<FONT COLOR="#000000">> <TR></FONT>
<FONT COLOR="#000000">> <TD ALIGN=RIGHT><% $CF->Name %>:</TD></FONT>
<FONT COLOR="#000000">> <TD><& /Elements/EditCustomField, CustomField => $CF, NamePrefix =></FONT>
<FONT COLOR="#000000">>     "Object-RT::Transaction--CustomField-" &><em><% $CF->FriendlyType %</FONT>
<FONT COLOR="#000000">> ></em></TD></FONT>
<FONT COLOR="#000000">> </TD></TR></FONT>
<FONT COLOR="#000000">> % }</FONT>
<FONT COLOR="#000000">> % }</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> However, I found that including this same code in the SelfService's</FONT>
<FONT COLOR="#000000">> Create.html did not do the trick -- it resulted in some empty tables on</FONT>
<FONT COLOR="#000000">> the page.  My current thinking is that maybe the includes in this code</FONT>
<FONT COLOR="#000000">> (e.g. /Ticket/Elements/EditCustomFields, etc.) aren't available from the</FONT>
<FONT COLOR="#000000">> SelfService directory.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> I noticed that the RT Wiki mentioned that someone had once posted a code</FONT>
<FONT COLOR="#000000">> snippet to get this to work, but the Wiki doesn't know where to find it</FONT>
<FONT COLOR="#000000">> (see <A HREF="http://wiki.bestpractical.com/index.cgi?PostQuestionsHere">http://wiki.bestpractical.com/index.cgi?PostQuestionsHere</A> ).  Does</FONT>
<FONT COLOR="#000000">> anyone know how this can be done?  Any suggestions would be greatly</FONT>
<FONT COLOR="#000000">> appreciated.</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Regards,</FONT>
<FONT COLOR="#000000">> Vance</FONT>

<FONT COLOR="#000000">> _______________________________________________</FONT>
<FONT COLOR="#000000">> <A HREF="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</A></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Community help: <A HREF="http://wiki.bestpractical.com">http://wiki.bestpractical.com</A></FONT>
<FONT COLOR="#000000">> Commercial support: <A HREF="mailto:sales@bestpractical.com">sales@bestpractical.com</A></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. </FONT>
<FONT COLOR="#000000">> Buy a copy at <A HREF="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</A></FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> We're hiring! Come hack Perl for Best Practical: <A HREF="http://bestpractical.com/about/jobs.html">http://bestpractical.com/about/jobs.html</A></FONT>

</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>