Help with Custom Pages

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:

% 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) {

% } % $i++; % } % }
<%$CustomField->Name%>
<%$CustomField->FriendlyType%>
<& EditCustomField, Object => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix , Default => $m->notes('Field-' . $CustomField->Id), &> % if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
<% $msg %>

Does anyone have an idea how to limit this to only one NAMED Custom Field???
Thanks
MFG

Torsten Brumm

http://www.torsten-brumm.de

Hi,

Try it:

% $QueueObj = $TicketObj->QueueObj; % my $CustomField = RT::CustomField->new($QueueObj->CurrentUser); % $CustomField->LoadByNameAndQueue(Name => "cfname", Queue => $QueueObj->Id); % }
<& /Elements/EditCustomField, Object => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix , Default => $m->notes('Field-' . $CustomField->Id), &> % if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
<% $msg %>

Bye,

BekenyOn Fri, 09 Feb 2007 12:03:57 +0100, Torsten Brumm torsten.brumm@googlemail.com 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:

% 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) {

% } % $i++; % } % }
<%$CustomField->Name%>
<%$CustomField->FriendlyType%>
<& EditCustomField, Object => $TicketObj, CustomField => $CustomField, NamePrefix => $NamePrefix , Default => $m->notes('Field-' . $CustomField->Id), &> % if (my $msg = $m->notes('InvalidField-' . $CustomField->Id)) {
<% $msg %>

Does anyone have an idea how to limit this to only one NAMED Custom
Field???
Thanks

Bekény