How i can create non-editable text in text area

Hi Friends…
I want a non-editable text in textarea. In that textarea user can write but can’t edit or delete the default one.
I uses attribute “readonly=“yes”” and editable=“false” but these tags make full text area non-editable which is not required.
I want the editable text area with non-editable default text.
I don’t Know what should I do??
Please help…
Thanks in advance…

Firstly, why do you want that, and secondly, where? Do you mean that a user will type over the text? That will look messy.

It wouldn’t be very accessible, but you may be able to add padding to the textarea and have a background image on it, with the text as part of the image showing in the padding area.

Similar to Ralph’s suggestion of a BG image + padding: what about text in a pseudo element, with absolute positioning?

Still has accessibility concerns; it may not be what you want; and the whole thing sounds like it might be a bad idea anyway.

Does the user need to see the text? Read/hear it? Or is it just something that you want to have submitted along with their text?

Does the text have to be at the beginning of the textarea?

Thanks for replying…
Whether user can see it or not, never matters.
But I want just submit this non-editable text with user messsage.
How I can do it??

Thanks for reply…
Yes, the text have to be at the beginning of the textarea…
What should I do??

What happens to the message after being submitted? Sent to email, or …?

If the user doesn’t have to see the text, and shouldn’t be able to edit it, you should add it server-side after the form has been submitted.

If the user doesn’t have to see the text, and shouldn’t be able to edit it, you should add it server-side after the form has been submitted.

I agree. By your description, it should never be seen in the browser.

Appending or prepending a string to an incoming variable would be very easy, if that’s what you need to do.

If the user doesn’t have to see the text, and shouldn’t be able to edit it, you should add it server-side after the form has been submitted.

That is the BEST solution, use PHP/ASP… whatever to add the text to the message AFTER the for is submitted or validated. This has the added advantage of being the most secure method. Other than that, since the text/value doesn’t have to bee seen you could use <input type=“hidden” name=“addToText” value=“your additional text…”> .When you send the message send BOTH the textarea name and addToText.

Hope that helps