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

English! place to talk about OTRS development, programming and coding

Moderator: tto

Post Reply
test
OTRS newbie
Posts: 2
Joined: 11 Mar 2016, 10:46
OTRS Version?: 5.0.5
Real Name: test
Company: test

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

Post by test » 17 Mar 2016, 14:53

Hi All,

How to hide dynamicfield dropdown value while page load in customerticketmessage.pm while creating ticket.

undefined
OTRS newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
OTRS Version?: 5.0.9

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

Post by undefined » 19 Jul 2016, 05:43

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
OTRS newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
OTRS Version?: 5.0.9

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

Post by undefined » 19 Jul 2016, 05:58

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
OTRS guru
Posts: 4795
Joined: 13 Mar 2011, 09:54
OTRS Version?: 3.3.x
Company: Perl-Services.de
Contact:

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

Post by reneeb » 19 Jul 2016, 08:50

If you want to "hide" some *values* of the DynamicField, ACLs are your friend...
Perl / OTRS development: http://perl-services.de
Free OTRS add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de

User avatar
tto
Moderator
Posts: 315
Joined: 09 Jan 2007, 15:24
OTRS 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 » 19 Jul 2016, 10:12

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
OTRS newbie
Posts: 5
Joined: 12 Jul 2016, 09:48
OTRS Version?: 5.0.9

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

Post by undefined » 19 Jul 2016, 10:22

seem like I misunderstanding :lol: :lol:

thanks for advice

Post Reply