PDA

View Full Version : Placing HTML text and formatting inside textarea


crubbles
03-17-2003, 05:15 PM
In creating some custom error pages (.shtml) for my site I wanted to include a feedback form requesting the visitor to explain how they encountered an error.

In that feedback form I wanted to include the following code in the textarea that will be submitted with the form:


---Enter message here---

---Please do not edit or type below this line---
<!--#echo var="HTTP_REFERER" --><br>
<!--#echo var="REMOTE_ADDR" --><br>
<!--#echo var="REQUEST_URI" --><br>
<!--#echo var="HTTP_HOST" --><br>
<!--#echo var="HTTP_USER_AGENT" --><br>
<!--#echo var="REDIRECT_STATUS" --><br>



Unfortunately, when I place the above code before the closing textarea tag, it isn't read as HTML. It is simply placed inside the textarea as text and is displayed as you see above.

I do not know how to go about making the code to be processed by HTML... can it be done?

I would also like the code to be read-only but I doubt that is even possible.

Nightfire
03-17-2003, 05:37 PM
Can't you just add them into hidden form fields? Then no one can edit them

cg9com
03-18-2003, 04:26 PM
anything inside the <textarea></textarea> isnt going to be rendered as markup.
i think Nightfire has the solution you may need.
you can make a textarea field readonly by adding this inside of the elements attributes.
readonly="readonly"