[Solved]displaying diferent dynamic field according to Queue

Moderator: crythias

Locked
vladvladvlad
Znuny newbie
Posts: 18
Joined: 05 Sep 2012, 16:30
Znuny Version: 3.1.9
Real Name: kenneth
Company: none

[Solved]displaying diferent dynamic field according to Queue

Post by vladvladvlad »

Hi, is there anyway to display different kinds of dynamic field according to queue selected from the customer interface?

Currently, what I had use is the codes below which is use to hide the fields.
document.getElementById('DynamicField_ProjectName').style.display = 'none';
document.getElementById('LabelDynamicField_ProjectName').style.display = 'none';

However, it has a huge blank space once I hid the fields which causes my newticket page to be not presentable.
So are there anything i could such that every queue is able to display the fields I want in a more appropriate manner?
Last edited by vladvladvlad on 12 Dec 2012, 11:35, edited 1 time in total.
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: displaying diferent dynamic field according to Queue

Post by reneeb »

You have to hide the div with the field not just the field itself:

Code: Select all

$('#DynamicField_ProjectName').parent().addClass( 'Hidden' );
$('#LabelDynamicField_ProjectName').hide();
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
vladvladvlad
Znuny newbie
Posts: 18
Joined: 05 Sep 2012, 16:30
Znuny Version: 3.1.9
Real Name: kenneth
Company: none

Re: displaying diferent dynamic field according to Queue

Post by vladvladvlad »

I had tried the code u given to me just now, however there is still the spacing there.
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: displaying diferent dynamic field according to Queue

Post by reneeb »

Ah right, I hadn't in mind that the structure changed a bit. It should be

Code: Select all

$('#LabelDynamicField_ProjectName').parent().addClass( 'Hidden' );
Label and Field are wrapped within one div...

Edit: we need parens after parent...
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
vladvladvlad
Znuny newbie
Posts: 18
Joined: 05 Sep 2012, 16:30
Znuny Version: 3.1.9
Real Name: kenneth
Company: none

Re: displaying diferent dynamic field according to Queue

Post by vladvladvlad »

Image

here is a screenshot
vladvladvlad
Znuny newbie
Posts: 18
Joined: 05 Sep 2012, 16:30
Znuny Version: 3.1.9
Real Name: kenneth
Company: none

Re: displaying diferent dynamic field according to Queue

Post by vladvladvlad »

thanks it works!
Locked