show / hide dynamic fields in ViewNotes by type

Moderator: crythias

Locked
loesch
Znuny newbie
Posts: 1
Joined: 25 Jul 2013, 11:28
Znuny Version: 3.2.0

show / hide dynamic fields in ViewNotes by type

Post by loesch »

I want to show / hide different dynamic fields based on what Type the Ticket is for e.g. in ViewNotes

For example:
IF Type ist "Fachtest" Dynamic Field1 and dynamic Field2 should be displayed
IF Type ist "Change" Dynamic Field3 and dynamic Field4 should be displayed

In Sysconfig Frontend: Agent:Ticket:ViewNote I can only choose to display all, if I want to see them
joecopty
Znuny newbie
Posts: 22
Joined: 11 Jan 2013, 01:42
Znuny Version: 3.2.6
Real Name: Joseph Copty
Company: TMC

Re: show / hide dynamic fields in ViewNotes by type

Post by joecopty »

This will require you to apply some changes to the dtl files.
Remember before doing any changes to the DTL file you should create a theme. what is a theme? see here and do some research.
The names of the html label elements that show your dynamic field is most likely something like this : LabelDynamicField_myDynamicFieldName
Use java script to hide show elements.

Code: Select all

document.getElementById('LabelDynamicField_Product').style.display = 'block'; //show this
document.getElementById('LabelDynamicField_SerialNo').style.display = 'none'; // hide this
See this tutorial for solving a similar situation

Hope this helps
Sydney, Australia
OTRS 3.3.6 on Windows Server 2003, IIS6 with MSSQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: show / hide dynamic fields in ViewNotes by type

Post by crythias »

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
Locked