add dropdown field in CustomerUser

Moderator: crythias

Locked
LukeSkyWalker
Znuny newbie
Posts: 4
Joined: 25 Jun 2012, 12:19
Znuny Version: 3.1.6
Real Name: Luca Lombardi
Company: EDSlan

add dropdown field in CustomerUser

Post by LukeSkyWalker »

Hi,

As manuals, in files config.pm I successfully added a free field in Managing Customers.

# CustomerUser
# (customer user database backend and settings)
$Self->{CustomerUser} = {
Name => 'Database Backend',
Module => 'Kernel::System::CustomerUser::DB',
.....
Map => [

# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown (1=always,2=lite), required, storage-type, http-link, readonly, http-link-target, link class(es)
[ 'UserCodiceCliente', 'CodiceClienteEDSlan', 'codice_cliente', 1, 0, 'var', '', 0 ],
...


perfect! But now I can't add a field of type dropdown or checkbox.

I looked everywhere but can not find on any specific.
Only customization Dynamic Fields in tickets or articles.

Can anyone help me? Thanks a lot
LukeSkyWalker
Znuny newbie
Posts: 4
Joined: 25 Jun 2012, 12:19
Znuny Version: 3.1.6
Real Name: Luca Lombardi
Company: EDSlan

Re: add dropdown field in CustomerUser

Post by LukeSkyWalker »

Help please...
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: add dropdown field in CustomerUser

Post by crythias »

Read Defaults.pm but don't modify Defaults.pm

If you want a dropdown list for a field, you'll need to create a Selections entry in CustomerUser section of Config.pm

Code: Select all

        # default selections
        Selections => {

#            UserTitle => {
#                'Mr.' => 'Mr.',
#                'Mrs.' => 'Mrs.',
#            },
        },
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
LukeSkyWalker
Znuny newbie
Posts: 4
Joined: 25 Jun 2012, 12:19
Znuny Version: 3.1.6
Real Name: Luca Lombardi
Company: EDSlan

Re: add dropdown field in CustomerUser

Post by LukeSkyWalker »

Thank you. I try it. And for a checkbox, is possible?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: add dropdown field in CustomerUser

Post by crythias »

LukeSkyWalker wrote:Thank you. I try it. And for a checkbox, is possible?
Probably not but

Code: Select all

        Selections => {
            CheckFieldName => {
                'NoAnswer' => '',
                'Yes' => 'Yes',
                'No' => 'No',
            },
        },
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
LukeSkyWalker
Znuny newbie
Posts: 4
Joined: 25 Jun 2012, 12:19
Znuny Version: 3.1.6
Real Name: Luca Lombardi
Company: EDSlan

Re: add dropdown field in CustomerUser

Post by LukeSkyWalker »

Great! thank you Crythias
Locked