### [Limiting Words or Characters in a Field](https://wpforms.com/docs/how-to-limit-words-or-characters-in-a-form-field/)

**Published:** November 25, 2023
**Author:** Umair Majeed

**Excerpt:** Learn how to limit the number of words or characters that a user can enter into certain fields in your form.

**Content:**

Would you like to limit the number of words or characters that a user can enter into certain fields in your form? Long entries can be hard to review and sometimes may not fit your goals for a form.

This tutorial will show you how to easily restrict the length of Single Line Text and Paragraph Text fields.

Please enable JavaScript in your browser to complete this form.

##### Try this Form Demo!

Paragraph TextCannot exceed 50 characters

Submit![Loading](https://wpforms.com/wp-content/plugins/wpforms/assets/images/submit-spin.svg)

 ---

Before getting started, you’ll first need to make sure WPForms is [installed and activated](https://wpforms.com/docs/install-wpforms-plugin/ "How to Install the WPForms Plugin") on your WordPress site and that you’ve [verified your license](https://wpforms.com/docs/verify-wpforms-license/ "How to Verify Your WPForms License"). Then, you can [create a new form](https://wpforms.com/docs/creating-first-form/ "How to Create Your First Form") or edit an existing one to access the form builder.

### Adding a Character or Word Limit

Once your form builder is open, be sure to add either a **Single Line Text** or **Paragraph Text** field. For this example, we’ll add a **Paragraph Text** field.

![Add paragraph text field](https://wpforms.com/wp-content/uploads/2021/11/add-paragraph-text-field-2.png)

Now, click on this field in the preview area to open its **Field Options**.

![Click paragraph text field for field options](https://wpforms.com/wp-content/uploads/2021/11/click-paragraph-text-field-for-options-1.png)

Within the Field Options panel, click on the **Advanced** tab to open the field’s advanced options.

![Click-advanced-tab](https://wpforms.com/wp-content/uploads/2021/11/click-advanced-tab.png)

Then, to limit the number of characters or words, select the **Limit Length** option.

![Enable limit length option](https://wpforms.com/wp-content/uploads/2021/11/enable-limit-length-option.png)

When you enable this option, two additional fields will display:

- **Number Input:** Enter a numeric value to use as the maximum limit.
- **Characters and Words Dropdown:** Choose whether you’d like to limit by the number of individual characters or words.

**Note:** If you’ve chosen to limit the length by **Characters**, keep in mind that spaces, periods, commas, etc. all count toward the total character limit.

For our example, we’ll limit our field to 100 characters.

![Limit length options](https://wpforms.com/wp-content/uploads/2021/11/limit-length-options.png)

After setting up these options how you’d like, be sure to save your form.

**Note:** To prevent users from entering special characters in Single Line Text and Paragraph Text fields, you can apply certain restrictions using a PHP snippet. For instructions on how to set this up, see our [developer documentation](https://wpforms.com/developers/how-to-restrict-special-characters-from-a-form-field/).

### Testing Your Form

For the last step in this setup, we recommend testing your form so you can check that it looks and works how you’d like. Our detailed guide on [ testing forms](https://wpforms.com/docs/how-to-properly-test-your-wordpress-forms-before-launching-checklist/ "How to Properly Test Your WordPress Forms Before Launching [Checklist]") shares a checklist of recommended steps to consider before publishing your forms.

For this particular feature, the main thing you should notice when testing your form is the text showing how many words or characters are allowed, and how many have been used.

![Character count](https://wpforms.com/wp-content/uploads/2021/11/character-count.png)

Once the limit is reached, the user will not be able to enter any additional characters in this field.

**Note:** For advanced field customization, consider using custom input masks to define and restrict the format of the entry. Learn how to implement this in our guide on [using custom input masks in WPForms](https://wpforms.com/docs/how-to-use-custom-input-masks/).

### Frequently Asked Questions

Below, we’ve answered some of the most common questions we receive regarding limiting words or characters.

##### Can I set a minimum number of characters for text input on my forms?

Yes, you can enforce a minimum character count for Single Line Text, Paragraph Text, and Password fields. For detailed instructions on setting a minimum character limit, please refer to our [developer documentation](https://wpforms.com/developers/how-to-set-a-minimum-number-of-characters-on-a-text-form-field/).

**Note:** Please be aware that this requires advanced functionality, such as adding code to your site, and is therefore recommended for developers.

That’s it! You can now limit the number of words or characters that a user can enter into your Single Line Text and Paragraph Text fields.

Next, would you like to customize your form’s automatic notification emails? Notification emails can easily include a header logo, custom background color, and custom content. Be sure to check out our tutorial on [setting up notification emails](https://wpforms.com/docs/setup-form-notification-wpforms/ "How to Set Up Form Notification Emails in WPForms") for all the details.

**Categories:** Fields, Field Customizations

---

