Skip to main content
Wordpress Logo

How to Add a Character Limit To a Contact Form 7 Text Box

Adding a character limit to a Contact Form 7 text box requires a little bit of code to make it work.

The trick:  You can’t use a textarea, it must be just a text field.

The code: text your-name 100/140 will give you a single line text box that is 100 characters wide and has a character limit of 140 characters.

To make the box mandatory, add a * after the texttext* your-name 100/140

It’s as beautifully simple as that.

Sara Thornton

Sara is WebHolism's SEO Guide and Trainer. She's the one you'll see in all our YouTube videos, and helping folks out with their SEO queries on social media. She runs the fabulous SEO Clarity Club which teaches women how to do their own SEO. In her spare time she loves board games, and splashing around in the sea.


Leave a Reply

Your email address will not be published. Required fields are marked *