Now everything works fine but the problem is when I submit the ticket the
dropdown doesn't put any value in the ticket.
Can please some one help me with this?
The code that I have in the dropdown is (I believe that is a programer
problem):
<!-- Drop down test -->
<tr>
<td width="15%" class="contentkey">Tipo de pedido</td>
<td width="85%" class="contentvalue"> <select name="Tipo_Pedido">
<option value="||-">-</option>
<option value="3||Configuracao">Configuração</option>
<option value="4||Proposta simples (AIM OC0/1)">Proposta simples (AIM
OC0/1)</option>
<option value="1||Postmaster">Postmaster</option>
<option value="2||Raw">Raw</option>
</select>
<font color="red" size="-2"></font>
</td>
</tr>
2008/1/29, Sune T. Tougaard <[EMAIL PROTECTED]>:
>
> 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
> "<OTRS_CONFIG_Home>/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<formElement.length; i++) {
> // All form fields that we want, are prefixed with "CustForm_".
> if (formElement[i].name.match("CustForm_") == "CustForm_") {
> // But we don't really want it shown in the ticket. Remove it.
> formElement[i].name =
> formElement[i].name.replace(/^CustForm_/, "");
> // Show the field name and its value on its own line.
> bodyContent = bodyContent + formElement[i].name + ': ' +
> formElement[i].value + '\r\n';
> }
> }
> // Replace the hidden "Body" area with the contents of the form
> fields.
> document.compose.Body.value = bodyContent;
> // Return original submit function.
> return submit_compose();
> }
> **
>
> And in the same file, find the lines:
>
> **
> <td class="contentkey">$Text{"Text"}:</td>
> <td class="contentvalue">
> <textarea name="Body" rows="15"
> cols="$Config{"Ticket::Frontend::TextAreaNote"}"
> wrap="$Env{"BrowserWrap"}">$QData{"Body"}</textarea>
> **
>
> *Replace* those with:
>
> **
> <input type="hidden" name="Body" value="$QData{"body"}">
> <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:
>
> **
> <input class="button" accesskey="g" type="submit" value="$Text{"Submit"}"
> onclick="return submit_compose();">
> **
>
> *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:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *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 <[EMAIL PROTECTED]>:
> >
> > 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:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *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) <[EMAIL PROTECTED]>:
> > >
> > > 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.
> > >
> > > > And if there is any template that I can use for ticket instead of
> > > > plain text
> > >
> > > I don't believe OTRS supports HTML mail out of the box.
> > >
> > > Nils Breunese.
> > > _______________________________________________
> > > OTRS mailing list: otrs - Webpage: http://otrs.org/
> > > Archive: http://lists.otrs.org/pipermail/otrs
> > > To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
> > > Support or consulting for your OTRS system?
> > > => http://www.otrs.com/
> > >
> >
> >
> > _______________________________________________
> > OTRS mailing list: otrs - Webpage: http://otrs.org/
> > Archive: http://lists.otrs.org/pipermail/otrs
> > To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
> > Support or consulting for your OTRS system?
> > => http://www.otrs.com/
> >
>
>
> _______________________________________________
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
> Support or consulting for your OTRS system?
> => http://www.otrs.com/
>
_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support or consulting for your OTRS system?
=> http://www.otrs.com/