Using FreeKey in CustomerMessageNew.dtl

In the file Kernel/Output/HTML/Standard/CustomerMessageNew.dtl there is an example on how to use the "FreeTicket" feature to add FreeTicket information to the new ticket form that a customer fills out. However, I am having trouble using this feature. I have the following code in my Kernel/Config.pm file: # Add extra ticket fields $Self->{"TicketFreeKey1"} = { '' => '-', 'InventoryNumber' => 'Inventory number', }; I then changed the code in CustomerMessageNew.dtl to read <tr> <td>Inventory number:</td> <td>$Data{"TicketFreeKey1"}</td> </tr> The intent is to have a text box so that the customer can type in the inventory number on their computer and to have that inventory number automatically populate the FreeKey1 field for the ticket. How do I get this to work? Thanks.

Dear Adam, Using names rules. otrsdev12 schrieb:
<tr> <td>Inventory number:</td> <td>$Data{"TicketFreeKey1"}</td> </tr>
Use this, as proposed in CustomerMessageNew.dtl: <tr> <td>$Data{"TicketFreeKeyField1"}:</td> <td>$Data{"TicketFreeTextField1"}</td> </tr> hth, Robert Kehl PS: This were better suited for the [otrs] list, though.

I am afraid I do not know what "names rules" means. I tried as you suggested and uncommented the lines <tr> <td>$Data{"TicketFreeKeyField1"}:</td> <td>$Data{"TicketFreeTextField1"}</td> </tr> in CustomerMessageNew.dtl. I now get _two_ input boxes. I simply want a single box that the user can type in their inventory number and have that number put in the ticket with key "InventoryNumber" and value whatever they typed. Is this possible? I can find no example anywhere demonstrating this. (Since this is a question with the beta version of OTRS I thought that it would be inappropriate to post on the otrs group.) A. Lewenberg Robert Kehl wrote:
Dear Adam,
Using names rules.
otrsdev12 schrieb:
<tr> <td>Inventory number:</td> <td>$Data{"TicketFreeKey1"}</td> </tr>
Use this, as proposed in CustomerMessageNew.dtl:
<tr> <td>$Data{"TicketFreeKeyField1"}:</td> <td>$Data{"TicketFreeTextField1"}</td> </tr>
hth,
Robert Kehl
PS: This were better suited for the [otrs] list, though. _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Hi, otrsdev12 wrote:
I am afraid I do not know what "names rules" means. I tried as you suggested and uncommented the lines
<tr> <td>$Data{"TicketFreeKeyField1"}:</td> <td>$Data{"TicketFreeTextField1"}</td> </tr>
in CustomerMessageNew.dtl. I now get _two_ input boxes. I simply want a single box that the user can type in their inventory number and have that number put in the ticket with key "InventoryNumber" and value whatever they typed. Is this possible? I can find no example anywhere demonstrating this. (Since this is a question with the beta version of OTRS I thought that it would be inappropriate to post on the otrs group.)
Try: [Kernel/Config.pm] $Self->{"TicketFreeKey1"} = { 'InventoryNumber' => 'InventoryNumber', }; [...] .-)
A. Lewenberg
Martin Edenhofer

Martin Edenhofer wrote:
Hi,
otrsdev12 wrote:
I am afraid I do not know what "names rules" means. I tried as you suggested and uncommented the lines
<tr> <td>$Data{"TicketFreeKeyField1"}:</td> <td>$Data{"TicketFreeTextField1"}</td> </tr>
in CustomerMessageNew.dtl. I now get _two_ input boxes. I simply want a single box that the user can type in their inventory number and have that number put in the ticket with key "InventoryNumber" and value whatever they typed. Is this possible? I can find no example anywhere demonstrating this. (Since this is a question with the beta version of OTRS I thought that it would be inappropriate to post on the otrs group.)
Try:
[Kernel/Config.pm] $Self->{"TicketFreeKey1"} = { 'InventoryNumber' => 'InventoryNumber', }; [...]
.-)
A. Lewenberg
Martin Edenhofer _______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
That put me much closer, thanks. Now, if I type in "InventoryNumber" in the first box, and the actual inventory number in the second box (say, "H347JY"), the ticket is correctly popluated ("freekey1" set to "InventoryNumber" and "freetext1" set to "H347JY"). But how can I get the first box to not be a box but instead be just the text "InventoryNumber" so that the customer does not have to know to type in "InventoryNumber"?

otrsdev12 wrote:
That put me much closer, thanks. Now, if I type in "InventoryNumber" in the first box, and the actual inventory number in the second box (say, "H347JY"), the ticket is correctly popluated ("freekey1" set to "InventoryNumber" and "freetext1" set to "H347JY"). But how can I get the first box to not be a box but instead be just the text "InventoryNumber" so that the customer does not have to know to type in "InventoryNumber"?
Oh sorry, now it tested it. It's a bug. :-/ Update Kernel/Modules/CustomerMessage.pm to 1.36 from CVS and it works like you want! -Martin

Martin Edenhofer wrote:
otrsdev12 wrote:
That put me much closer, thanks. Now, if I type in "InventoryNumber" in the first box, and the actual inventory number in the second box (say, "H347JY"), the ticket is correctly popluated ("freekey1" set to "InventoryNumber" and "freetext1" set to "H347JY"). But how can I get the first box to not be a box but instead be just the text "InventoryNumber" so that the customer does not have to know to type in "InventoryNumber"?
Oh sorry, now it tested it. It's a bug. :-/
Update Kernel/Modules/CustomerMessage.pm to 1.36 from CVS and it works like you want!
-Martin _______________________________________________
That did it. Thanks!
participants (3)
-
Martin Edenhofer
-
otrsdev12
-
Robert Kehl