set different defaults for dropdown dynamic fields on queue update

Moderator: crythias

Post Reply
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

set different defaults for dropdown dynamic fields on queue update

Post by Giulio Soleni »

Hi
I would like to preset the default value of a dropdown dyn field (myDorpdownDynField) with a different option, based on the selection of the queue in Customer Ticket create form.
I have done some customization to CustomerTicketMessage.tt file on Dest change (based on viewtopic.php?f=60&t=24116) using lines like:

Code: Select all

document.getElementById('DynamicField_myDorpdownDynField').selectedIndex = 2;
or

Code: Select all

document.getElementById('DynamicField_myDorpdownDynField').selectedIndex = 4;
or

Code: Select all

document.getElementById('DynamicField_myDorpdownDynField').selectedIndex = -1; 
trying to reset the list
...with no result.

On the other hand, the preset of free text fields perfectly works:

Code: Select all

document.getElementById('DynamicField_myTextDynField').value = 'preset value';
Why the same does not work with dropdown fields?
May you help me?

Thank you
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
Post Reply