Activity dialog: Hide dynamic fields based on value of another field

Moderator: crythias

Post Reply
aph
Znuny superhero
Posts: 646
Joined: 20 Jun 2014, 12:11
Znuny Version: 3.3.9, 4.x, 5.x

Activity dialog: Hide dynamic fields based on value of another field

Post by aph »

Take inspiration from this link viewtopic.php?t=24116 I was able to show/hide dynamic fields based on values of other fields on phone ticket mask. I would like to now implement this in an activity dialog and need some help.
The scenario I have is that we some 4 link fields to an external system in an activity dialog providing agents possibility to enter up to 4 links to an external system. In most cases only one of the field is used and other 3 are empty. In order not to make the activity dialog too lengthy, I would like to display link field 2 only if field 1 is not empty, display field 3 only if 1 and 2 are not empty and so on.

How do I go about implementing this. Which .dtl file do I have to add my script to?
OTRS 3.3.x (private/testing) on Windows Server 2008 with MSSQL database.
OTRS 3.3.x (private/testing) on CentOS with MySQL database and apache
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Activity dialog: Hide dynamic fields based on value of another field

Post by crythias »

Kernel/Output/HTML/Standard/AgentTicketProcess.tt/.dtl might be useful.
but you'll want to make some changes, perhaps in ProcessManagement/DynamicField.tt or .dtl
For version 4, maybe something like this so you can address the DynamicField document.getElementById('RRR_DF_MyField')

Code: Select all

<div class="Row Row_DynamicField_[% Data.Name %]" id="RRR_DF_[% Data.Name %]">
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
Post Reply