Hello,
I’m trying to do a ticket feedback page in SelfService, for user to evaluate
the response to the ticket. I took a Update.html code from SelfService/ and
changed it to display only the fields that I need. But after clicking the
submit button, values of the customfield does not change, I get the
Display.html view, but the URL is lef the same: Feedback.html. Logs also
don’t show any activity, like nothing was happening.
How to submit my data so it would update the ticket fields?
Here I create a form with 2 customfiels and comment box.
<& /SelfService/Elements/Header,
Title =>loc(‘Leave feedback for ticket #[_1]’, $Ticket->id)
&>
<tr id="CF-<%$CustomField->id%>-ShowRow">
<input type="hidden" class="hidden"
name="Object-RT::Ticket-<%$Ticket->Id%>-CustomField-<%$CustomField->Id%>-Values-Magic"
value=“1”>
% }
% }
%}
% if($showComment) {
%}
<% $CustomField->Name %>: % if($count == 0) {
% if ($CustomField->Type eq ‘Select’) {
<& /Elements/EditCustomFieldSelect, @add &>
% } elsif ($CustomField->Type eq ‘Combobox’) {
<& /Elements/EditCustomFieldCombobox, @add &>
% } elsif ($CustomField->Type eq ‘Freeform’) {
<& /Elements/EditCustomFieldFreeform, @add &>
% } elsif ($CustomField->Type eq ‘Text’) {
<& /Elements/EditCustomFieldText, @add &>
% } elsif ($CustomField->Type eq ‘Date’) {
<& /Elements/EditCustomFieldDate, @add, Default => undef &>
% } elsif ($CustomField->Type eq ‘DateTime’) {
% # Pass datemanip format to prevent another tz date conversion
<& /Elements/EditCustomFieldDateTime, @add, Default => undef,
Format => ‘datemanip’ &>
% }
% } else {
% $showComment = 0;
% unless ( $count ) {
<&|/l&>(no value)</&>
% } elsif ( $count == 1 ) {
% $print_value->( $CustomField, $Values->First );
% } else {
-
% $print_value->( $CustomField, $Value );
% while ( my $Value = $Values->Next ) {
% }
% }
Komentaras: <& /Elements/MessageBox, Name=>“UpdateContent”,
IncludeSignature => 1, %ARGS &>
<& /Elements/Submit, Label => loc('Submit feedback'), Name =>
‘SubmitTicket’, id => ‘SubmitTicket’ &>
<& /Elements/ShowHistory, Object => $Ticket, ShowHeaders => $ARGS{'ShowHeaders'}, DownloadableHeaders => 0 &>Here I check for a submit button click and some do some validation.
if ( exists $ARGS{SubmitTicket} ) {
my $kokybe = $ARGS{‘Bulk-Add-CustomField-102-Values’};
if($kokybe && $kokybe =~ /Puikiai/) {
$m->callback(CallbackName => 'BeforeDisplay', Ticket => \$Ticket,
ARGSRef => %ARGS);
return $m->comp(‘Display.html’, TicketObj => $Ticket, %ARGS);
} elsif($kokybe) {
my $atsiliepimas = $ARGS{‘Bulk-Add-CustomField-103-Value’};
if($atsiliepimas && $atsiliepimas =~ /Kita/) {
my $komentaras = $ARGS{‘UpdateContent’};
if($komentaras) {
$m->callback(CallbackName => ‘BeforeDisplay’, Ticket =>
$Ticket, ARGSRef => %ARGS);
return $m->comp(‘Display.html’, TicketObj => $Ticket,
%ARGS);
} else {
push @results, loc(‘Fill the field “Komentaras” with your
comment’);
}
} elsif($atsiliepimas) {
$m->callback(CallbackName => ‘BeforeDisplay’, Ticket =>
$Ticket, ARGSRef => %ARGS);
return $m->comp(‘Display.html’, TicketObj => $Ticket, %ARGS);
} else {
push @results, loc(‘Choose appropriate value for
“Atsiliepimas”’);
}
}
}
View this message in context: http://requesttracker.8502.n7.nabble.com/Custom-ticket-update-page-not-submiting-values-tp57496.html