Hi,
Try it:
<table>
% $QueueObj = $TicketObj->QueueObj;
% my $CustomField = RT::CustomField->new($QueueObj->CurrentUser);
% $CustomField->LoadByNameAndQueue(Name => "cfname", Queue =>
$QueueObj->Id);
<tr>
<td class="entry"><& /Elements/EditCustomField,
Object => $TicketObj,
CustomField => $CustomField,
NamePrefix => $NamePrefix ,
Default => $m->notes('Field-' . $CustomField->Id),
&>
% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
<br />
<em style="color: red"><% $msg %></em></td>
% }
</tr>
</table>
Bye,
--
Bekeny
On Fri, 09 Feb 2007 12:03:57 +0100, Torsten Brumm
<[EMAIL PROTECTED]> wrote:
Hi RT Users,
i'm trying to customize the Create.html Page and fighting with the Custom
Field Section. I found that the Custom Fields from a specific queue are
hand
over from Create.html to a Element called EditCustomFields. So far so
good.
This renders all the Custom Fields for this queue.
What i need in this "special" Case is only one Custom Field!
At the Elements/EditCustomFields i found the following:
<table>
<tr>
<td valign="top" width="50%">
<table>
% my @entry_fields;
% my $i;
% my $cfcount = $CustomFields->Count;
% $cfcount++ if ($cfcount % 2) ; # if we have an odd number of
% #custom fields, fudge it so we know where to put in the table break
% while (my $CustomField = $CustomFields->Next()) {
% if ($cfcount == 2 * $i) {
</table>
</td>
<td valign="top" width="50%">
<table>
% }
% $i++;
<tr>
<td class="labeltop">
<b><%$CustomField->Name%></b><br>
<i><%$CustomField->FriendlyType%></i>
</td>
<td class="entry"><& EditCustomField,
Object => $TicketObj,
CustomField => $CustomField,
NamePrefix => $NamePrefix ,
Default => $m->notes('Field-' . $CustomField->Id),
&>
% if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
<br>
<em style="color: red"><% $msg %></em></td>
% }
</tr>
% }
</table>
</td>
</tr>
</table>
Does anyone have an idea how to limit this to only one NAMED Custom
Field???
Thanks
--
Bekény
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]
Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com