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?
[Solved]displaying diferent dynamic field according to Queue
Moderator: crythias
-
- 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
Last edited by vladvladvlad on 12 Dec 2012, 11:35, edited 1 time in total.
-
- 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
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- 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
I had tried the code u given to me just now, however there is still the spacing there.
-
- 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
Ah right, I hadn't in mind that the structure changed a bit. It should be Label and Field are wrapped within one div...
Edit: we need parens after parent...
Code: Select all
$('#LabelDynamicField_ProjectName').parent().addClass( 'Hidden' );
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
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Znuny newbie
- Posts: 18
- Joined: 05 Sep 2012, 16:30
- Znuny Version: 3.1.9
- Real Name: kenneth
- Company: none
-
- 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
thanks it works!