How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

English! place to talk about development, programming and coding
Post Reply
test
Znuny newbie
Posts: 2
Joined: 11 Mar 2016, 10:46
Znuny Version: 5.0.5
Real Name: test
Company: test

How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by test »

Hi All,

How to hide dynamicfield dropdown value while page load in customerticketmessage.pm while creating ticket.
undefined
Znuny newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
Znuny Version: 5.0.9

Re: How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by undefined »

Hi, I am also a newbie in OTRS. I had figured out one of the way to hide the dynamic field in customer ticket message page of OTRS.

1. create a new folder /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard. *The installation path may be different
2. copy /opt/otrs/Kernel/Output/HTML/Templates/Standard/CustomerTicketMessage.tt into the new folder.
3. Open the customer ticket pages, get the class name of the dynamic fields from the source code page. (for google chrome is Ctrl+U)
4. Edit the /opt/otrs/Custom/Kernel/Output/HTML/Templates/Standard/CustomerTicketMessage.tt, you can apend some javascript here to hide the field .(code below is sample code)

Code: Select all


<script type="text/javascript">//<![CDATA

var DropdownTest = document.getElementsByClassName('Row_DynamicField_DropdownTest');

window.onload = function() {
	OnloadFunction();
};


function OnloadFunction() {
    for(var i = 0; i < DropdownTest .length; i++){
        DropdownTest [i].style.visibility = "hidden"; // or
        DropdownTest [i].style.display = "none"; // depending on what you're doing
    }
}


//]]></script>

5. Done.(Tested work on OTRS version 5)


Hope for other more proper and easier way, thanks.
undefined
Znuny newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
Znuny Version: 5.0.9

Re: How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by undefined »

Or just go through sysconfig

1. Admin -> Sysconfig -> Ticket -> Frontend::Customer::Ticket::ViewNew
2. Search Ticket::Frontend::CustomerTicketMessage###DynamicField.
3. Edit the content of Dropdown field to "0" .
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by reneeb »

If you want to "hide" some *values* of the DynamicField, ACLs are your friend...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
tto
Znuny wizard
Posts: 315
Joined: 09 Jan 2007, 15:24
Znuny Version: OTRS 5.0.x
Real Name: Torsten
Company: c.a.p.e. IT GmbH
Location: Chemnitz
Contact:

Re: How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by tto »

reneeb wrote:If you want to "hide" some *values* of the DynamicField, ACLs are your friend...
...and if you want to hide entire fields depending on other fields value, ACLs in KIX(4OTRS) are your friends as well :-).

regards, T.
--
KIX 17.x (fork of OTRS)
Professional KIX-, or OTRS-integration, development and consulting by c.a.p.e. IT - http://www.cape-it.de
For questions and hints regarding KIX(4OTRS) please go to https://forum.kixdesk.com/
Bei Fragen und Hinweisen zu KIX(4OTRS) bitte an https://forum.kixdesk.com/ wenden.
undefined
Znuny newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
Znuny Version: 5.0.9

Re: How to hide dynamicfield dropdown value in customerticketmessage.pm of otrs

Post by undefined »

seem like I misunderstanding :lol: :lol:

thanks for advice
Post Reply