Creating new dropdown field at Customer Portal

English! place to talk about development, programming and coding
Post Reply
samerelk
Znuny newbie
Posts: 1
Joined: 21 Aug 2019, 07:42
Znuny Version: 5.0.10
Real Name: Samer
Company: Crystal Networks

Creating new dropdown field at Customer Portal

Post by samerelk »

Hello all,

I am new to OTRS.
My version is 5.0.10 installed on a Linux server.
I am trying to add a new dropdown field from the OTRS database where I created a new table to select from it.

I tried to follow the same flow used to select ticket types, as follow:
1. I created a new Perl module (GetProducts.pm) in /Kernel/System where a sub does a select from database using DB Object and returning back hash variable.
2. I edited CustomerTicketMessage.pm where I called my Perl module (GetProduct.pm) and passed my hash variable to BuildSelection function to create HTML options.
3. I edited CustomerTicketMessage.tt where I added a new text dynamic field and passed the variable from the Perl module ([% Data.ProductStrg %])

When I test the result, I can see the dropdown field but always empty.
Any suggestions on how to debug my modules by following my subroutines?
Or any suggestions on how to create this dropdown field in an easier way?

Thanks in advance!
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Creating new dropdown field at Customer Portal

Post by root »

Hi,

Did you ever think about not reinventing the wheel? There are several modules available which populate drop-down fields with data from database tables. Some of them can also be obtained without having a support contract. Just check the typical resources for feature add-ons. Will save you time and nerves. Or take a developer training.

To help you with such a task here at the forum, the related source code will definitely help ;-)

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply