Custom config option - hash of arrays

Moderator: crythias

Locked
ioudas
Znuny newbie
Posts: 5
Joined: 25 Jan 2013, 12:41
Znuny Version: 3.1.12

Custom config option - hash of arrays

Post by ioudas »

<<UPDATE>> PLEASE IGNORE THIS POST I THINK I FIGURED IT OUT, WILL POST SOLUTION SHORTLY
Hi,
I'd added custom module to OTRS for which I need a new hash of arrays in sysconfig.
I need two "Add new entry" buttons:
1) one for new hash element (key is a dynamic field)
2) one for a new array element for each hash key.

I achieved the desired UI look by creating the perl data type manualy in config.pm or zzzauto.pm (I know we aren't supposed to edit this :) as shown here: https://ioudas.net/otrs_config_hash.jpg
I also tried to configure the option in the xml as follows:

Code: Select all

 <Setting>
          <Hash>
            <Item Key="iws">
                <Hash>
                    <Item Key="1"></Item>
                    <Item Key="2"></Item>
                </Hash>
            </Item>
          </Hash>
      </Setting>
But in both cases the "plus" button only adds another string=>string entry, not string=>array entry as desired

Can you please confirm that what I'm trying to do cannot be done so that I can stop trying? :)
Thanks
Locked