Help Desk Software & Beyond
May 21, 2012, 11:55:20 PM *
Welcome, Guest. Please login or register.
To post messages you need to register. We apologize for inconvenience, but this is to prevent spam.
Registration is instant (no email verification) and we do not ask for any personal information.

Login with username, password and session length
News: Welcome to Help Desk Software forum!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: [MOD] Form data output sorting order  (Read 5376 times)
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« on: December 28, 2007, 10:59:51 AM »

Hello,

Where or how can I change the display of the forms output ...for example, currently when a ticket is submitted it appears as this in TTX helpdesk

Billing City: TEST
Billing Number: TEST
Billing Postal Code: TEST
Billing Province: TEST
Billing Street Address: TEST

However ...I would like the output to be something this

---------------------------Customer Information----------------------------

Billing Number:                           TEST
Billing Street Address:                  TEST
Billing Province:                          TEST
Billing City:                               TEST
Billing Postal Code:                     TEST

---------------------------Service Request---------------------------------

You get the idea : )


Thank you in advance
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #1 on: December 28, 2007, 11:04:05 AM »

Just edit the HTML templates in Notepad.  Don't use an HTML editor unless you know what you're doing... they will auto-edit the code and really screw it up.

ticket.html is the one you want I think.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #2 on: December 28, 2007, 11:04:57 AM »

This sticky thread you'll find helpful...

http://forum.unitedwebcoders.com/index.php/topic,412.0.html
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #3 on: December 28, 2007, 11:48:35 AM »

Thank you for the quick response .....

I have tried that and it didn't work ...... I guess I need to know how to access the (%MESSAGES%) in order to break apart msg .... or I could completly off ... I am kinda new too this but overall have had alot of sucess with this program...you guys have done an amazing job

Also .... just a thought ...in order for this work ...should I change the form action="(%ENV_SCRIPT_NAME%)"
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #4 on: December 28, 2007, 12:15:03 PM »

Quote
in order for this work ...should I change the form action="(%ENV_SCRIPT_NAME%)"

Don't take this the wrong way but that's way off the mark.  That macro inserts the correct path to the TTX program.  Change that and nothing will work.

Quote
I guess I need to know how to access the (%MESSAGES%) in order to break apart msg

That macro is where TTX inserts the messages for the ticket.

If you need to change the content of the (%MESSAGES%) macro, then you need to edit the ticket subroutine inside the TTXTicket.pm module.  Back everything up as it's very easy to break it if you make one small mistake.

I don't expect you to have much success without a major re-write of the code.  The information you wish to edit are the optional data fields collected on the new ticket page, correct?  Displayed in the beginning of the first message, right?  You could probably change how they look, bold, etc,  But you won't easily be able to change the display order.  Those fields are displayed alphabetically.

You could purchase the Layout Designer module which will give you more control.  Custom fields get placed in the upper header section of the ticket and become editable.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #5 on: December 28, 2007, 12:30:32 PM »

The ticket subroutine of TTXTicket.pm pulls the text out of the database and displays it inside the template.

lines 1447 - 1527

Wherever you see this code... it's putting content into the MESSAGES macro on the page...

Code:
$data->{MESSAGES} .=



You'd probably want to edit this data before it gets saved in the ticket.  The newticket subroutine would handle that.

lines  773 - 805
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #6 on: December 28, 2007, 12:41:00 PM »

Thank you sir!

I will try it ..and let you know ...thank you again : )
Logged
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #7 on: January 17, 2008, 04:16:23 PM »

**** Update ****

I have officially given up on this one folks .... I have tried numerous ways to edit this but no luck .... has anyone else tried to change the output format?
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #8 on: January 17, 2008, 04:38:33 PM »

**** Update ****

I have officially given up on this one folks .... I have tried numerous ways to edit this but no luck .... has anyone else tried to change the output format?

This is an extremely complex problem.

I was successful in removing the output from the first message and thus only keeping it in the ticket header but that's not what you're asking.  But I can display the information in the header in any order I like... plus it's operator editable.

I just finished up moving several thousand messages into the two new forums.... I did not see any previous discussions about how to change the output of the custom fields to a custom sort order.

My only other suggestion would be to change the first character of each field name so that alphabetically you'll still get what you want.  One blank space in front will move an item to the top, etc...  Other ASCII characters can be used as well... you might have to get creative.
« Last Edit: January 17, 2008, 06:31:50 PM by sparky672 » Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #9 on: January 22, 2008, 11:31:42 AM »

Hello,

Thats exactly what I did  Grin and after a few tests ... it seems it work great Smiley
Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #10 on: January 22, 2008, 11:37:06 AM »

If you get a chance, please list those here so we can see how you did it.

This seems to be a common issue.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
arvin
Sr. Member
****

Karma: 10
Posts: 400


Yeah thats right !


View Profile
« Reply #11 on: January 22, 2008, 12:22:27 PM »

Basically .... When I was creating my various html template forms .... I named all of my input name fields alphabetically,  since TTX will arrange everything alphabetically this was the only fast ..simple... and easy solution.

Here is an example of what the form data output looks like now......

Billing Account Number: TEST
Billing Address: TEST
Billing City and Province: TEST
Billing Postal Code: TEST
Contact Name: TEST
Contact Number: TEST
Desired Due Date: TEST
End Customer First Name: TEST
End Customer Last Name: TEST
Existing or Previous Number: TEST
Service Address: TEST
Service City and Province: TEST
Special Order Comments: TEST
Type Of Order: New Install
Type Of Service: Residence Touch Tone Line
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

At line 773 in TTXTicket.pm is where the form data starts to get processed

At line 804 in TTXTicket.pm is where the form data gets placed in order of $input:$val 
(actual code at line 804) $custom .= "$input: $val\n" if !$cfg->get("c$cidx.internal");

I was unable to "call" on specific input fields in line 804 ........ However .... I was able to add

~~~~~~~~~~~~~~~~Customer Information~~~~~~~~~~~~~~~

But it created a new line for each entry and this is what the output looked like....

~~~~~~~~~~~~~~~~Customer Information~~~~~~~~~~~~~~~
$input:$val
~~~~~~~~~~~~~~~~Customer Information~~~~~~~~~~~~~~~
$input:$val
~~~~~~~~~~~~~~~~Customer Information~~~~~~~~~~~~~~~
$input:$val
~~~~~~~~~~~~~~~~Customer Information~~~~~~~~~~~~~~~
$input:$val


I hope that this helps ..... if you require more information please ask ... this is something that I will be working on ...... or if you can figure it out that even better  Grin
Logged
Paul Nolette
Newbie
*

Karma: 10
Posts: 49


View Profile
« Reply #12 on: October 22, 2008, 03:45:09 PM »

This is an older post but I was looking to solve this same issue and found the answer so thought I'd share it.
In TTXTicket.pm, find:
Code:
my @inputs = sort $query->param();
and change it to this (just remove the word sort):
Code:
my @inputs = $query->param();


Logged
Sparky
Moderator
Hero Member
*****

Karma: 83
Posts: 2,228


stop pushing all those buttons


View Profile
« Reply #13 on: October 22, 2008, 03:52:57 PM »

This is an older post but I was looking to solve this same issue and found the answer so thought I'd share it.
In TTXTicket.pm, find:
Code:
my @inputs = sort $query->param();
and change it to this (just remove the word sort):
Code:
my @inputs = $query->param();

I assume that without the sorting, they'll come in as they're read in from the form.  Is this the case?  Also, I wonder if different browsers could impact how the form data comes in.
Logged

Did you update the paths in ttxcfg.cgi after moving TTX to your new location?   Undecided
To those seeking help.... please report back when you figure it out.  Cheesy
Paul Nolette
Newbie
*

Karma: 10
Posts: 49


View Profile
« Reply #14 on: October 24, 2008, 03:29:28 PM »

That is correct they come in, in the exact order they are in on the form. Not sure if the broswer would have any affect, we only use IE7 and it works fine.
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1 RC3 | SMF © 2001-2006, Lewis Media Valid XHTML 1.0! Valid CSS!
Page created in 0.033 seconds with 19 queries.