I want to be able to show a dynamic field on a process ticket on the customer web portal if a specific value in a dropdown list is called e.g.
If DynamicField_DropdownBox1 = 1 Then
DynamicField_ExtraBox = Visable
If DynamicField_DropdownBox1 <> 1 Then
DynamicField_ExtraBox = Hidden
I have OTRS and KIX4OTRS installed at their latest version.
I found this code below but to be honest I dont know where to begin. I dont even know how to modify it or even where on my RedHat system to put the code (sorry im a bit of a newbie!).
Code: Select all
<script type="text/javascript">//<![CDATA[
function nonetext() {
$("[id^=DynamicField]").parent().addClass( 'Hidden' );
$("[id^=LabelDynamicField]").parent().addClass('Hidden');
}
$('#Dest').bind('change', function (Event) {
Core.AJAX.FormUpdate($('#NewPhoneTicket'), 'AJAXUpdate', 'Dest', ['TypeID', 'NewUserID', 'NewResponsibleID', 'NextStateID', 'PriorityID', 'ServiceID', 'SLAID', 'SignKeyID', 'CryptKeyID', 'To', 'Cc', 'Bcc', 'StandardTemplateID' $Data{"DynamicFieldNamesStrg"}]);
switch ( $('#Dest').val() ) {
case "3\|\|Junk": // need to slash escape the pipes. Also, need to be in numerical order
nonetext();
$('#DynamicField_myField').parent().removeClass( 'Hidden' );
$('#LabelDynamicField_myField').parent().removeClass( 'Hidden' );
break;
default:
nonetext();
}
});
//]]></script>