Creating a rich text <textarea> for a FreeTextField

Moderator: crythias

Locked
weatherbys
Znuny newbie
Posts: 10
Joined: 17 Jun 2010, 13:12
Znuny Version: 2.0.2

Creating a rich text <textarea> for a FreeTextField

Post by weatherbys »

Hi.

I have added a new freetext field to my Change forms and it appears in the Change Edit screen as expected. However, it is an <input> field and I would like it to be a <textarea> field formatted in the same way as the Change Justification field. So, to achieve this I have used the following code in AgentITSMChangeEdit.dtl:

Code: Select all

<label class="Mandatory" for="RichText3"><span class="Marker">*</span> $Text{"Implementation Plan"}<input type="hidden" value="Implementation Plan" name="ChangeFreeKey1">:</label>
                    <div class="RichTextField">
                        <textarea id="RichText3" class="RichText" name="ChangeFreeTextField1" rows="15" cols="$Config{"Ticket::Frontend::TextAreaNote"}">$Data{"ChangeFreeText1"}</textarea>
                        <div id="RichText3Error" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                        <div id="RichText3ServerError" class="TooltipErrorMessage"><p>$Text{"This field is required."}</p></div>
                    </div>
                    <div class="Clear"></div>
However, although the field appears and contains the field data, when i submit the form the field content is replaced with the words "ServerError". There are no errors in the System Log.

Can anyone explain what I am doing wrong please?

Thank you.

Dan
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Creating a rich text <textarea> for a FreeTextField

Post by jojo »

you can not use these fields as text area. have a look at the error log of the webserver (apache)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Locked