This pretty much sums it up i think.
As mentioned earlier, i don't know much perl, html or javascript so the code
may (most likely) suck bigtime.
But it appears to work as i'd like it to.
I wanted to change as little of the original code as possible.
The only file that needs changing is
"/Kernel/Output/HTML/<themename>/CustomerTicketMessage.dtl
"
My original plan was to put this in separate files, and then include them as
needed, with some check on the customers groups, so i could display
different forms for different customers, but i haven't gotten that far yet.
Here goes...
Add the following function to script area of the "CustomerTicketMessage.dtl"
file.
**
// Function to put form fields into the textarea body.
function replaceBody(theForm) {
var bodyContent = "";
var formElement = theForm.elements;
for(i=0; i$QData{"Body"}</textarea>
**
Replace those with:
**
<td class="contenthead">Who are you?</td>
<td class="contentvalue">
<tr>
<td class="contentkey">Name:</td>
<td class="contentvalue"><input type='text' name='CustForm_Name'
id='CustForm_Name' size='70' value=''></td>
</tr>
<tr>
<td class="contentkey">Company:</td>
<td class="contentvalue"><input type='text' name='CustForm_Company'
id='CustForm_Company' size='70' value=''></td>
</tr>
**
And in the line:
**
**
Replace "submit_compose();" with "replaceBody(this.form);"
That should be it, more or less...
You can of course add other fields as necessary.
As long as the field names are prefixed with "CustForm_", the script should
be able to get the contents.
Dunno how it handles radio buttons, checkboxes, dropdown selects and that
kind of stuff, though.
You are of course doing this at your own "risk", even though it should be
pretty harmless. :-)
I'm runnin otrs 2.2.4 on windows, by the way. Shouldn't matter much, though.
Hope that helps.
--
/Sune
_____
From: otrs-bounces@otrs.org [mailto:otrs-bounces@otrs.org] On Behalf Of
Miguel Dias
Sent: 29. januar 2008 18:34
To: User questions and discussions about OTRS.org
Subject: Re: [otrs] pre-sales oriented
Ok thank you
2008/1/29, Sune T. Tougaard mailto:stt@lyngsoesystems.com >:
I've (almost) made a simple (maybe too simple) html forms based interface
for the customer interface, instead of the textarea.
Been looking a bit into a few wysiwyg editors to replace the textarea, and
the way most of them are implemented, gave me the idea to just make the
textarea "Body" a hidden input type, and then just filling that hidden input
with the contents of the form on submit.
Client-side and relies on javascript, but i think that the standard
interface also is (please correct me if i'm wrong).
The ticket ends up looking as a plain-text ticket, but that doesn't matter,
as long as the input-phase is appealing to the customer.
Don't know much html, perl or javascript, but still i managed to do it, so
almost anyone should be able to.
I can share, if you like, but i'd like to clean it up a bit first... ;-)
--
/Sune
_____
From: otrs-bounces@otrs.org mailto:otrs-bounces@otrs.org
[mailto:otrs-bounces@otrs.org mailto:otrs-bounces@otrs.org ] On Behalf Of
Miguel Dias
Sent: 29. januar 2008 16:27
To: User questions and discussions about OTRS.org
Subject: Re: [otrs] pre-sales oriented
Ok,
And there is any way to have one template that can be charged on new ticked
for example:
Name:____
Company:____
Machine:___
Serial number:___
I'm trying to implement OTRS to my company, and I would like to make it so
customized as possible.
Best Regards.
2008/1/29, Nils Breunese (Lemonbit) mailto:nils@lemonbit.nl >:
Miguel Dias wrote:
I have read in the offical site that the OTRS was pre-sales oriented
can some one tell me how.
The site says: "The system is built to allow your support, sales, pre-
sales, billing, internal IT, helpdesk, etc. department to react
quickly to inbound inquiries." OTRS is not specifically targeted at
pre-sales, that's just an example of what you can use it for.