Different Field on Different Queue

Moderator: crythias

Locked
srenon
Znuny newbie
Posts: 60
Joined: 20 Mar 2013, 14:26
Znuny Version: 3.3.8

Different Field on Different Queue

Post by srenon »

Hello,

I succeeded in displaying some specific field when a specific queue is selected with the code below :

In my AgentTicketEmail.dtl i inserted that

Code: Select all

switch ($('#Dest').val() ) { //this is where the queue is relevant (Dest = Queue)
		case  "5\|\|Documentation": // need to slash escape the pipes
		document.getElementById('DynamicField_Themes').style.display = 'block';
		document.getElementById('LabelDynamicField_Themes').style.display = 'block';
		break;
		case  "6||Documentation::Projet d'arrêté": // need to slash escape the pipes
		document.getElementById('DynamicField_Themes').style.display = 'block';
		document.getElementById('LabelDynamicField_Themes').style.display = 'block';
		break;
		default:
		document.compose.RichText.value = $('#Dest').val(); //remove this. debug only. shows queue information
		document.getElementById('DynamicField_Themes').style.display = 'none';
		document.getElementById('LabelDynamicField_Themes').style.display = 'none';
It is working well and display my Field "Themes" when i want it to be.

I try to do it with a dynamic date field and it is not so easy... Can you give me some tips?

Best regards
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Different Field on Different Queue

Post by crythias »

Also hide/show these:
DynamicField_fieldnameMonth
DynamicField_fieldnameDay
DynamicField_fieldnameYear
DynamicField_fieldnameHour
DynamicField_fieldnameMinute
DynamicField_fieldnameDayDatepickerIcon

Can't necessarily hide the " - " but you can try with some javascript nextSibling code (beyond the scope of this right now).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
srenon
Znuny newbie
Posts: 60
Joined: 20 Mar 2013, 14:26
Znuny Version: 3.3.8

Re: Different Field on Different Queue

Post by srenon »

Thank you!
Locked