### [How to Display a Total Word Count Under Your Form Field](https://wpforms.com/developers/how-to-display-a-total-word-count-under-your-form-field/)

**Published:** October 22, 2020
**Author:** Editorial Team

**Excerpt:** This tutorial will show you how easy it is to put a word count under your Single Line Text and Paragraph form fields! 

**Content:**

Would you like to display a total word count under your **Paragraph Text** form field? By default, when you using the **Limit Length** on the **Single Line Text** or **Paragraph Text** form fields, you can easily limit the characters or words for these fields and if you would like to learn more about this setting, [please review this documentation](https://wpforms.com/docs/how-to-limit-words-or-characters-in-a-form-field/ "How to Limit Words or Characters in a Form Field").

However, for the purpose of this tutorial, we don’t want to limit the words or characters, but display a total count instead. So in this tutorial, we’re going to walk you through each step on how to achieve this.

## Creating up your form

To begin, you’ll need to create a new form and add your fields. In this tutorial, we’re creating a form that will accept requests for engraving items so we’ll also add a **Paragraph Text** form field to the form for the engraved message. You’ll need to take note of the field ID as we’ll be using this in a later step.

![add a paragraph form field to your form](https://wpforms.com/wp-content/uploads/2020/10/wpforms-paragraph-text.jpg)

If you need help on creating a new form, [please review this documentation](https://wpforms.com/docs/creating-first-form/ "Creating Your First Form").

Next, we’re going to add an **HTML** form field to the form as well. This will dynamically populate with the word count as your visitors type into the **Paragraph Text** field. You’ll also need to take note of this field ID as well.

![Next, add your HTML Code block to your form, this will hold the word count total](https://wpforms.com/wp-content/uploads/2020/10/wpforms-html-block.jpg)

## Displaying the total word count

Now that the form is created it’s time to add this snippet to your site to pull it all together.

If you need assistance on how to add snippets to your site, [please review this tutorial](https://wpforms.com/developers/how-to-add-custom-php-or-javascript-for-wpforms/ "How to Add Custom PHP or JavaScript for WPForms").

```

/**
 * Add a word count under the form field.
 *
 * @link  https://wpforms.com/developers/how-to-display-a-total-word-count-under-your-form-field/
 */

function wpf_dev_count_words_only() {
?>

**Categories:** Fields

**Tags:** JS, PHP

---

