can i set a maxlegth of characters when i am using textarea? if yes who i can do it?
Thank you very much

Recommended Answers

All 8 Replies

Yes, all you need to do is set the maxlength property in the textarea.

<textarea name="mytextarea" maxlength=100>

i' ve tried this but it did not work any idea why it doesn't work? Thank you very much

Can I see the form? It would make it much simpler to determine where the problem is.

Unfortunately, textarea doesn't support maxlength.
You can use javascript to limit the length

Are you familiar with jQuery?

Unfortunately, textarea doesn't support maxlength.
You can use javascript to limit the length

Are you familiar with jQuery?

You are right. I checked the HTML DOM and there is no maxlength property. If you know JavaScript or JQuery, both of those would be viable solutions.

not i am not familiar with jQuery. :( if i use input with type text i can set the rows and cols?

Using input means you're stuck with 1 row

that's true :(

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.