[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

Restrict Form Text Area to a max 200 charcters?

How do I restrict Form Text Area to a maximum of 200 charcters?
0
petewinter
Asked:
petewinter
  • 2
  • 2
1 Solution
 
Answering4uAntCommented:
maxlength = 200
0
 
petewinterAuthor Commented:
Does that mean the code should like this: <textarea name="why" cols="45" rows="5" id="why" maxlength="200"></textarea>

As I can still type more than 200 characters?
0
 
Answering4uAntCommented:
Sorry my error, maxlength doesn't work on textarea.
Try the link below, it has a counter and also alerts are XX characters have been entered, this should acheive what you require

http://inmyexperience.com/archives/000327.shtml
0
 
petewinterAuthor Commented:
Many Thanks
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now