Add characters counter of the text fields

Use this procedure to add character counters to text fields. When you have a counter on a text field, the counter shows the length of the entered text while you type. You can also specify the number of the recommended characters count. When you enable this function, it reminds you for the recommended characters count. If you exceed it, the counter will turn red, but will not restrict you from entering or saving long values into the fields.

By default, the counters are enables for the following fields:

  • Pages » Create or Edit page » Title for search engines field and Description field.
  • Image Widget » Create or Edit dialog » Title field and Alternative text field.

Configure the Characters counter for custom fields

You can enable character counter on any field.

Following is an example of how to enable the character counter on the Title field of the Edit dialog of the News module:

  1. Click Administration » Settings » Advanced.
  2. In the tree in the left, click News » Controls » NewsBackend » Views » NewsBackendEdit » Sections » MainSection » Fields » Title.
  3. Select the Show Character Counter checkbox
  4. In Recommended Characters Count, enter, for example, 70.
  5. In CharacterCounterDescription, enter, for example, Less than {0} characters are recommended.
  6. Click Save Changes button.

If you click Content » News and choose to edit a news item you will see that the character counter is configured, based on the data you have provided.  

NOTE: Most of the modules, like the News module, have different dialogs for the creating and edit functions. In order to keep the consistency, we recommend enabling the character counters for both NewsBackendInsert and NewsBackendEdit views.

Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?