Jump to content

Archived

This topic is now archived and is closed to further replies.

Drezard

Restricting chars

Recommended Posts

Hello, Just wondering with a HTML how do you restrict how many characters the user can enter into the form?

Whats the code.

- Cheers, Daniel

Share this post


Link to post
Share on other sites
<input type = 'text' maxlength = '10'>

this limits the number of characters to 10. 

p.s. - moving to html forum. please ask questions in the proper forum k thx.

Share this post


Link to post
Share on other sites
If you want to limit the number of characters for a textarea. Have a look at [url=http://www.phpfreaks.com/forums/index.php/topic,106608.0.html]this thread[/url].

Share this post


Link to post
Share on other sites
Be aware that this is a soft limit, and can easily be defeated by JS.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.