I have a couple more questions if you dont mind but i dont want to create another thread...
I need to hide a DynamicField from a Queue. The dynfield name is TicketFreeText15 and the label is Platform. The queue where that dynfield must be hidden is called Operations. Having a look to this thread viewtopic.php?t=24116 i understood that you have to add the following code after the Copyright disclaimer inside AgentTicketEmail.dtl ?
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>
Code: Select all
<script type="text/javascript">
function nonetext() {
$("#DynamicField_TicketFreeText15").parent().hide();
$("#LabelDynamicField_Platform").parent().hide();
}
$('#Dest').change(function(){
selection = $(this).val();
switch(selection)
{
case "3\|\|Operations":
nonetext();
$('#DynamicField_TicketFreeText15').parent().show();
$('#LabelDynamicField_Platform').parent().show();
break;
default:
nonetext();
}
});
nonetext();
</script>
Thanks!
David